Hi!\r\rWhat is the command to jump to the last frame of the previous scene.E.g.: I have three scenes: sceneA, sceneB and sceneC. An element of the last frame of each scene links to sceneZ. Now I want a button in sceneZ that links either to sceneA, sceneB or sceneC depending on where I came from.\rIdeas?\rprevScene() or prevFrame() doesn’t work. I jump to another Scene and I don’t know why.\r\rTHX\r\rHartwig

have the button code be:\r\ron(press){\rgotoAndPlay(Scene #, “SceneLabel”)\r}

? What is SceneLabel? And: I cant’t enter a concrete # because the number depends on the scene which I’m coming from. This is each time another one\r\rH.

Save the name of the scene with the button :

 on (press) {\r\r  // go there\r\r  _root.sceneNum = 3 ;\r\r}

Then you can use that number (I guess…)\r\rpom 0]

-previous scene links only to the scene just before in your scene panel\r-previous frame only goes back one frame\r-all scenes are considered part of the main timeline by Flash, and the frames are continuously numbered internally (ie last frame of scene one is 20, then 1st frame of scene two is 21)\r-you need to use a variable remembering the place you come from, so you can send the playhead back there:\r if you use buttons in your 3 scenes to reach scene z, in the on(release) of each, set the variable; like btn1: place=one; btn2: place=two… where place is the name of the variable, and one, two are the values you’re going to use in your goto actions in scene z\r then in scene z, supposing you got a “back” btn, action= on(release){gotoAndStop[place];} //you need to evaluate the variable, so as to use it’s value and not it’s name, else flash will try to goto a label named “place”…\r and of course, you need to put the labels (one, two,…) in the frames you want to go back to…\rI hope this works… :slight_smile:

Nope! unfortunately it doesn’t work. The variable is assigned the right value, but gotoAndStop[place] doesn’t work. Even I click on the right mousebutton and select back the playhead jumps to a scene I’ve never been previously.\rWhat did you mean with “evaluate the variable”? Is it the []?\rIn the frames I want to go back to I wrote: place=one;\rplace=two; …\r\rHartwig

try this:\r\ron the first frame of the main timeline, set your variable.\r\rvar thelastscene=1; //this would equal sceneA (in my world).\r\rthen when you execute the code of sceneA, you can…\r\r_root.thelastscene=1;\r\rsceneB\r\r_root.thelastscene=2;\r\rsceneC\r\r_root.thelastscene=3;\r\r********************\rNow, in Scene Z you may have a button.\r\ron(release){ //go back to the previous scene\r\r if(_root.thelastscene==1){\r gotoandplay(“sceneA”,framenumber);\r} else if (_root.thelastscene==2){\r gotoandplay(“sceneB”,framenumber);\r} else {\r\r (_root.thelastscene==1){\r gotoandplay(“sceneA”,framenumber);\r}\r}\r\rMaybe?

Yes, I solved it that way. But in the last else-loop write\r\r} else {\r\r(_root.thelastscene==3){\rgotoandplay(“sceneC”,framenumber);\r}\r\rTHX\r\rHartwig\r

ahem… um … ahem… the copy and paste thing did me in. I’m glad it worked for you.\r\r