View Full Version : buttons go to wrong scene, wrong frame
shathawa
02-16-2009, 12:28 AM
It's the buttons in the first scene, going to the next scene that don't work right. The buttons in the second scene (linking to the same scene, different frames) work fine. These buttons used to work right. Now they seem to go to the next scene, but not to the right frame. They pick random frames to go to.
I think my problem started when I gave this .fla file to a friend and he used it in Flash CS3. I have Flash 8 MX. This was saved as a backward compatibility but I saw something in the profile settings that said: CS3.
I have 2 scenes. The first scene (home page) has buttons that load to multiple frames in the second scene. These are the problem buttons. My action scripts look correct. IE:
on (release) {
gotoAndStop("Pages", 55);
}
HELP! I have tried everything. I think.
Susan
atomic
02-16-2009, 12:40 AM
Never target a scene name in your Flash life again, but only target a labeled frame...
Thus to target the first or for that matter any frame in another scene, start by labeling that targeted frame with an unique lable such as, in your case, my_target55 - no number only labels, or at least not starting off with a number, no spaces, no caps and no other special characters othe than the underscore - add _root or _level0 to your path to target the main timeline, and only target the labeled frame in your button's script...
on (release) {
_level0.gotoAndStop("my_target55");
}
shathawa
02-16-2009, 01:14 AM
I appreciate your help but I don't understand.
I was able to name the frame "seminars"
BUT, What part of the script is referencing the other scene (it's named pages) and what part of that script is referencing the named frame?
ie:
on (release) {
_level0.gotoAndStop("seminars");
}
is _level0 a reference to the other scene?
Susan
atomic
02-16-2009, 02:59 AM
...is _level0 a reference to the other scene?
In a way yes. Scenes only exist in the Flash project's .fla as you're building it. Once compiled into a .swf, the Flash player sees your movie as one big scene only... The main timeline, called _root or _level0...
Thus since you're targeting a labeled frame (which must be unique for each targeted frame), somewhere on now a one big scene movie, you must specify on which timeline, Flash will be able to find that labeled frame, thus _root or _level0, and then only target the labeled frame on that timeline.
Otherwise, if your button was nested in a movie clip, for example, and you didn't specify the main timeline with _root or _level0, Flash would go looking for a labeled frame within that movie clip itself, and of course wouldn't find it...
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.