View Full Version : problem with target movies
avelives
02-28-2003, 05:34 PM
Im sure theres loads of post about this already so apologies for my laziness but i havent got time to check for the answer.
And its real easy to, how do i get buttons to work in a loaded movie.
Say the main movies is called "MAIN" and the loaded movie is "LOADED"
how do i get buttons in the "loaded" movie which have commands like _root.gotoAndPlay to still work?
I realise that _root becomes the "main" movie so what is the new path??
farafiro
02-28-2003, 06:06 PM
as u realaised, the main MC which holds the loaded can be called with the _root
and the loaded can be called as:
if loaded in a level> call it with the level it is in (_level1.play())
or
if loaded to a target> call it with the target's name
avelives
03-01-2003, 02:09 PM
Im sure you are right but there must be something im missing.
Ok ill make an example up and you tell me what im doing wrong.
There are two movies, the "main" movie and the "loaded" movie.
The main movie contains a clip called "screen" which the other movie loads into.
in the loaded movie there is a button which tells the timeline of this movie to goto and play frame 3.
the code would be: on(press){
_root.gotoAndPlay(3);
}
When this movie is loaded into the "main" movie am i right in thinking the new path should be: on (press){
_root.screen.loaded.gotoAndPlay(3);
}
I cannot figure out whats going wrong??
Ricod
03-01-2003, 04:04 PM
Actually, if you loaded it into a _level1, I believe _level1 will be the _root of all you loaded in. Not sure here, but if you wanna test it, try your path with _level0.gotoAndPlay("something") instead. If it still doesn't work, there's something really weird going on ... :eek:
farafiro
03-02-2003, 05:32 AM
I am afraid, it's yes u r missing something. Here is the code in your case//the main time line can be called either with _root or _level0 from anywhere
//the loaded swf, loads into a target called screel, so its name becomes screen
//so its path would be:
_root.screen.play()
avelives
03-02-2003, 12:36 PM
I got it now, i tested a new movie (a simple test thing) to get this to work and it does!! hooray..
But i still cant get it to work in my more complicated movie!! booo..
Anyway i know the right way to do it now just a question of finding where i went wrong in my original movie.
Thanks for the help guys i can take from here...
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.