Groups | Blog | Home
all groups > flash actionscript > april 2005 >

flash actionscript : gotoAndPlay(variable) bug ?


Jeckyl
4/25/2005 12:00:00 AM
There are no scenes in a final movie .. just one big long movie with all the
scenes one-after-the-other.
so if there is a frame label with the appropriate name in the next scene ..
it will jump to it.

It could also be the BUG in gotoAndPlay when used as a function and when
there are multiple scenes and you've moved them around in order .. it goes
to wrong frame, even if you use a label. Instead use this.gotoAndPlay or
_root.gotoAndPlay etc etc (ie make it a method call, instead of a
function/action)
--
Jeckyl

kglad
4/25/2005 12:00:00 AM
JamieBurchell
4/25/2005 12:00:00 AM
JamieBurchell
4/25/2005 12:00:00 AM
Thanks Jeckyl. I only saw your posts just this minute - they weren't there
before it only showed kglad's post. Odd. Your first suggestion about duplicate
frame lables does not apply. This does sound like the flash bug(s!) so I will
use the dot prefix.
Jeckyl
4/25/2005 12:00:00 AM
yes .. already told you ... use this.gotoAndPlay or _root.gotoAndPlay etc as
appropriate. NEVER use gotoAndPlay WITHOUT a dot-prefix in front of it (if
you have scenes at least). Flash is buggy (any has been for several
versions with no fix for it yet).
--
Jeckyl

kglad
4/25/2005 12:00:00 AM
well, do you have a fla with scenes and did you, at some point, move a scene to
the first position? if so, you've rediscovered a known bug. and you already
know how to resolve the issue by using:

_root.gotoAndPlay()
JamieBurchell
4/25/2005 12:00:00 AM
As I said, this issue does sound like the flash bug mentioned. I may well have
moved scenes about - just as I may have gone to the toilet while working on the
project, or sneezed or anything else that might cause flash to expose bugs.

Thanks for all your help.
Jeckyl
4/25/2005 12:00:00 AM
Going to the toilet and this bug are remarkably similar in their effects
:):)

Because it is so easy to get into the situation where the bug bits you, that
is why I say to NEVER EVER use gotoAndPlay as a function (without a dot
prefix as appropriate). Its just not work the risk.
--
Jeckyl

JamieBurchell
4/25/2005 1:04:25 PM
Hi

I have on the main timeline in Scene 1, frame 1, _level0 a frame labbled
"Welcome".

Later on along the timeline I do a gotoAndPlay("Welcome"); it works. If I do
_level0.gotoAndPlay(variable); where variable is my frame lable it also works.
When I do gotoAndPlay(variable) it jumps to a different scene? Why doesn't the
last one work when I am already at _level0?

Using Flash MX 2004 Pro.

Thanks

Jamie.
JamieBurchell
4/26/2005 12:00:00 AM
AddThis Social Bookmark Button