ForumsProgramming ForumAction script 2.0 scenes...

3 5342
jesse03
offline
jesse03
4 posts
Nomad

I've been trying to get my button on release to jump from my "Menu" scene to jump to my "Scene 1" but I have had no luck what so ever.

I first create text that says "start" then convert that to a button. Next I right click the text and put in this action into it.

on(release){
gotoAndPlay("Scene 1"

}


I then run my flash document and click / release and it does nothing... idk what I'm doing wrong D:

  • 3 Replies
dank
offline
dank
986 posts
Peasant

The method call for gotoAndPlay is:
gotoAndPlay(frame, scene);
Just put the scene you want in the second parameter.

KGuare
offline
KGuare
29 posts
Nomad

gotoAndPlay(frame, scene);


That's in AS3,
in AS2, it's the frame number first
and then the scene name (string.)

Because you only put one argument,
Flash assumes that's the frame label because
the gotoAndPlay function's scene name parameter is optional,
but the frame number - or label - is required.

Also Jesse, I've had some problems getting
scenes to work efficiently in AS2,
they're a tad unreliable. Since then, I've
switched to using frame labels in the same scene.
It works just as good, and uses less bandwidth.
KGuare
offline
KGuare
29 posts
Nomad

in AS2, it's the frame number first
and then the scene name (string.)


Arg, i looked over that a thousand times
and told myself it was correct.
Allow me to reiterate,

In AS2, it's the scene name (string) first,
and then the frame number (or frame label)
.

Here's a AS2 language reference quote to reassure myself;
gotoAndPlay([scene:String], frame:Object) : Void
Sorry about that. :/
Showing 1-3 of 3