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

flash actionscript : labels in scenes


ho
4/9/2005 12:00:00 AM
i created a quiz that should run in three languages. i use labels 'g'+1 [to 30]
to navigate to the German questions. for the French and Italian version i
duplicated the German scene. the quiz runs fine but i get a warning that i use
duplicate labels. i then changed the French an Italian labels to 'f1'... and
'i1'... now if i gotoAndStop('f15') in the French scene it works fine - but if
i gotoAndStop('f'+15) i 'fall' out of the scene - the strange thing is if i
gotoAndStop('g'+15) in the French scene i'll go to the correct (French) frame
although there is no 'g15' frame in that scene. what do you think. is it safe
to use a (in my eyes) not quite understandable hack that seems to work (using
the 'g'-labels throughout) or could i run into trouble with this? thanks for
comments -- dieter
Jeckyl
4/9/2005 12:00:00 AM
Sounds like you've stuffed up your labels. Maybe make your FLA available so
other eyes can see what maybe you can't.
--
Jeckyl

ho
4/9/2005 12:00:00 AM
i would love to -- but how can i attach a fla? i you like i'll mail a
'lite-version' to you... first select the 'laguage' - then the button will
take you to 5 frames. g-version and f-version work well although f-version
uses the 'non-existing' labels. the i-version doesn't seem to work...
Jeckyl
4/9/2005 12:00:00 AM
artful_me at hotmail dot com

But best if you upload it to a web site and provide us with a link to
download it from.
--
All the best
Jeckyl

ho
4/9/2005 12:00:00 AM
here it is...

Jeckyl
4/9/2005 12:00:00 AM
I cannot read that .. please use a more generic form like .zip for packaging
it up.
--
All the best
Jeckyl

Jeckyl
4/10/2005 12:00:00 AM
Well .. for a start you are using the VERY BUGGY scene names in your
gotoAndPlay ... do NOT EVER EVER use scene names in script. Ever.

In fact, it goes beyond that.

NEVER EVER use gotoAndPlay or gotoAndStop WITHOUT a prefix like _root. or
this. or _parent. etc. a plain gotoAndStop('label') WILL NOT COMPILE
CORRECTLY and will JUMP TO THE WRONG FRAME (if you have multiple scenes and
reorder the scenes)

THAT is the problem with your movie. If you change to use
"this.gotoAndStop" then all works as it should.

You've been bitten by a bug that has been in Flash for several
versions/years now and MM still has not fixed, that makes gotoAndStop/Play
action simply NOT WORK if you have multiple scenes that you reorder (I
assume you must have changed the order of the scenes at some stage while
making this movie)

Its not really your fault .. what you have there SHOULD work if Flash was
not buggy .. it is Flash that is buggy, not your movie. Fortunately, if you
follow the advice above, you can avoid the bug. MM should really FIX this
bug, so you don't need to change your valid movie to avoid them.
--
All the best
Jeckyl

ho
4/10/2005 11:06:16 AM
sorry -- i forgot that we're living in a windows world...

http://www.ho-phi.ch/uploads/scenes.zip

i hope you can open this file...

AddThis Social Bookmark Button