Set Variable As Label?

I’d like my button to set a variable, then play the rest of the frames. On the last frame I want it to jump to a label.

Can you set variables to labels?

I’ve got this on my button:

on (release) {
set(whereNext, dictate);

Then in the last frame I have:


But it’s not working. How might I accomplish this?

um… one is dictate, one is dictation?

also… wherenext is the variable name and dictate is supposed to be the expression

so, it would make more sense if it was


alright… I caught all that, but it’s still not working.

it plays to the last frame where this code is:


But instead of going there, it just keeps playing down the timeline

There is a problem with gotoAndPlay(variable) that has been solved by the guys at flashcoders (surprising…). Just put this.gotoAndPlay(variable). Dunno why but it works.

pom :smirk:

.gotoAndPlay(variable) ?

:stuck_out_tongue: this.gotoAndPlay(yourVariable)

Can you set a variable go to a frame label?

Nevermind… I got it working now… Thanks for all the help.

’ this ’ works well… is there another one I could use for a ’ child ’ MC?

What would be the eqivalent of ’ _level2 '?

What do you mean?

ah… thanks, but I figured it out. I was putting my coordinates in the wrong place. And… I was needing to use _level0…