This content has been marked as final. Show 12 replies
Apparently there's a bug in Flash where gotoAndStop or gotoAndPlay will go to the WRONG FRAME if you use scenes in your movie. Someone pointed it out in the AS2 documentation comments.
What is KILLING me is that when I import text into a textfield and interpret it as HTML, the following code CORRECTLY LOADS THE RIGHT FRAME. WTF? It is just killing me.
<a href="asfunction:gotoAndPlay,scene_name">Goto 'scene_name'</a>
I am using numbers now and it's working. SO LAME.
use frame labels only and use the goto methods, not the goto function:
_root.gotoAndPlay("scene2_frame22"); // and label that frame.
You apparently have not read my last post. There is a BUG in Flash when you have more than one scene. I was in fact using a frame label and the movie was going to the WRONG FRAME. Apparently this happens in certain versions of flash when you use scenes.
I don't ordinarily use scenes but I'm working on a file created by someone else. See the first comment here:
you apparently didn't read my message.
You should also read the rest of the comments because they define the cure, which is what kGlad was provding, though you may have to rebuild the file. If so, do it without scenes and save yourself the headaches they can cause.
Kglad, I didn't mean to sound disrespectful or anything. I'm very grateful for your suggestion. I did read your message and I tried _root.gotoAndPlay(sceneName) but the problem is the same.
Like I said, it's a bug.
Ned, as for 'rebuilding the file' I might as well rebuild the pyramids. It's huge and I just don't have the time. I didn't create it, but I must fix it.
Converting scenes into movieclips can be fairly quick work, regardless of size. If the scene approach doesn't resolve, it'll still be an option.
the problem you encountered was common before i posted my first message in these forums.
users expose the flash bug if they use scenes and move them after creation. the problem is easily reproduced by moving a scene to the beginning of the timeline and displacing what used to be the first scene.
i've personally responded to close to 100 different op's threads with the same information:
do not use scene information in navigation and do not use the goto functions. use the goto methods and frame labels.
in your case, don't use sceneName (unless that's actually a string variable whose value is a frame label).
i've never seen a problem using the goto methods and frame labels.
sceneName is a poorly named variable which actually refers to a frame label. 'shotinbombay' is an example of one of these frame labels which is the label on the 20th frame of my fourth scene. The scene's name (which is probably irrelevant) is 'Film'.
When I call _root.gotoAndStop('shotinbombay') in my Flash movie, the movie jumps to the frame 3 frames after the 'shotinbombay' frame (that would be frame 23 of the scene called 'Film'). The same exact thing happens when I just call gotoAndStop('shotinbombay').
EDIT: clarified actions of goto commands
i've never heard of that.
post a link to your fla and specify the location of the button with the errant goto.
I published the movie on a Mac with Flash CS4 demo installed on it and the problem disappeared. I truly appreciate the offer to look at the file, but now cannot replicate the problem. This is a bit embarrassing given how much I was complaining. I hope I wasn't sloppy and it was some kind of caching thing.
THANKS for your help.