[quoted text, click to view] > gotoAndPlay("2",191);
> all this does is start the movie again from the very beginning tho !!! i have
> tried this ...
> { gotoAndPlay("2",191);
> }
> just in case it needed the handlers but still no joy !!!!! oh master of all
> flash where am i going wrong lol !!!!!
> many thanks
> bwclan
This is common problem so don't be worry , we all came across that .
Something macromedia neglect to mention in manuals throughout many versions of flash.
I wrote about it many times but Jeckyl (forum regular participant) put it in way I would not
be able to explain better myself so I paste it for you :
SWF files that you publish have no scenes and no scene names. All your
scenes in Flash get concatenated into one long movie when published, with
each 'scene' playing in succession. The only special thing about a scene is
that on export, all objects you placed in the scene are removed at the end
of each scene (dynamically created movie clips don't get removed).
So, Flash Player cannot find a scene by name because there are no scenes and
no scenes names in the SWF file.
But .. how come you can use gotoAndPlay("scene 2",5) if there are no scenes
and Flash Player cannot find scenes by name? Well .. that's because it is
NOT the Flash Player that finds the frame when you use that syntax.
Instead, Flash itself finds the frame you specify and says to itself "aha ..
that is really the 35th frame of the movie" (if, say, scene 1 has 30 frames
in it) .. and so when it publishes the SWF file, it ACTUALLY generates code
that does a gotoAndPlay(35) instead. So the Flash Player is none the wise
and never knows the YOU specified it by scene name.
So .. how do you get around this. Very simple. Use frame labels instead
and do NOT use the scene name (eg. use gotoAndPlay(label); instead).
However, there is one further catch. Flash has a BUG in it, and if you
rearrange scenes it will get confused about where frame labels are and
generate incorrect code .. whether you specify the label directly or use a
variable. So .. now what do you do?
Well, you use _root.gotoAndPlay("label"); syntax instead. This does not suffer
from the Flash BUG, and so all should just work.
//
In addition , do not name things with numbers , labels, instance names etc... need to be starting
with characters . Flash will confuse it and might fail to works.
So , in your case :
gotoAndPlay("2",191);
place on frame 191 label name , call it frame191 than from button target it with
_root.gotoAndPlay("frame19");
It is good to develop a habit of empty layers.
Place empty layer on top of every other layer that stretch as long as the scene .
this allow you to place labels and action in one place w/o colliding with the existing content.
For instance in the middle of the tween you like ot have sound , in order to place it you need
a frame , which means you will need to tag it in the tween , putting on separate layer is always
good solution plus you can look for actions and labels in the same place throughout the whole movie
w/o scrolling up and down over the layers.
--
Regards
urami_*
<no>
http://flashfugitive.com/ </no>