Copy link to clipboard
Copied
I am completely stumped on this.
I have my project setup as the gameplay in one scene, and another scene for the outcome.
The outcome scene, say called, GameDone, has 2 frames. The first frame for win, labeled it WON, the second frame for lost, labeled LOST.
I could do the very simple thing and just gotoAndStop("GameDone", 1); but thats a bad practice, I believe.
Ive gone through google and found the closest thing needing a MovieClip. I could not figure out what to give it? A random MovieClip? a new one? one from the next scene? one from the current scene?
import flash.display.Scene;
for (var i:uint = 0; i < mc1.scenes.length; i++) {
var scene:Scene = mc1.scenes;
trace("scene " + scene.name + ": " + scene.numFrames + " frames");
}
That was an adobe sample.
So how could I, in the gameplay scene, the frame number for either WON or LOST in the "GameDone" scene?
Thanks.
Try doing the simple thing that you think is a bad practice. I don't know why you think it is. The only problem with it is that you appear to have it backwards for AS3... in AS3 it is gotoAndStop(frame,scene);
Why don't you use the frame labels instead of frame numbers? gotoAndStop("Won", "GameDone");
Copy link to clipboard
Copied
Try doing the simple thing that you think is a bad practice. I don't know why you think it is. The only problem with it is that you appear to have it backwards for AS3... in AS3 it is gotoAndStop(frame,scene);
Why don't you use the frame labels instead of frame numbers? gotoAndStop("Won", "GameDone");
Copy link to clipboard
Copied
EDIT:
My bad, you had it right, I actually messed up the cases, I was trying WON when it was Won, same with LOST.
Thanks.
Copy link to clipboard
Copied
You're welcome
Find more inspiration, events, and resources on the new Adobe Community
Explore Now