Use labels instead of scenes in programming

Don't use scenes to jump to by actionscript, there is an error in flash. Instead of using gotoAndPlay("scene1",2) simply define a lable at the given position (eg. first frame of scene 1) and jump to it: _root.gotoAndPlay("myLabel");
RconR Date: 24/11/2001
Can I jump to a label but using a variable. Because it doesn't seem to work. I tried _root.gotoandPlay (variable) but it doesn't work.
bokel Date: 24/11/2001
yes, one can easily use a variable for the label, eg. _root.myLabel = "home_part1"; _root.gotoAndPlay(_root.myLabel); but no, you can't use variables for scenes _root.myScene = "home"; gotoAndPlay(_root.myScene, 4); THAT WON'T WORK. I recommend never to use the goto with scenes, there is no need to do it.
vishal Date: 28/03/2007
thanks you very much! was racking my brain over this.
Add comment