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

flash actionscript : simple navigation


Leper
4/5/2004 9:19:01 PM
Hi,
I just got Flash MX 2004, and I'm having trouble doing simple navigation in
actionscript. I can't get gotoAndPlay to play a different scene and a certain
frame. It says to just put in the (scene, frame) but does that mean I put in
the name of the scene or the scene number? and do i put a space after the coma?
I donno, it shouldn't be hard, i know i'm just doing something stupid.. but
nothing seems to work.

Thanks
danieldmm
4/5/2004 9:38:03 PM
i don't know what you exactly do but here's the right thing explained

gotoAndPlay("Scenename", 1);

Open your "scene panel"(shift+F2 or windows panels) and look what the scene
you want to jump to is called or rename it to what you want to, and just change
where i typed "Scenename" (withing brackets because it's a string, a name) and
1 is the frame you want to go to you can change that too to whatever you want
I hope that helps
Jack.
4/5/2004 11:18:21 PM
With all previous versions, it was recommended to omit the
scene name / frame number, and use frame labels instead,
this method guarantees that your navigation will remain fault
free, regardless of the level in the player that calls the code -

main timeline - gotoAndPlay("label1");

from a movieclip to main timeline- _root.gotoAndPlay("label2");
or nested movieclip to its parent - _parent.gotoAndPlay("label3");

to a movie on level99 - _level99.gotoAndPlay("label99");
from level99 to main movie - _level0.gotoAndPlay("label0");

hth

AddThis Social Bookmark Button