Fancy changable destination goto action

I have been told that i can use something like

on (release) {
gotoAndPlay(“two”, 1);
destination = profile;
}

and then when it gets there.

gotoAndPlay(“destination”);

So it should bascially mean
gotoAndPlay(“profile”); when it gets there. Ive been fiddling and i cant get it to work. Am I doing something wrong? Or was it a lie? Thanks in advance.

Some errors in your script.

[FONT=Courier New]on (release) {
gotoAndPlay(“two”, 1);
destination = “profile”;//with quotes, since profile is a frame label
}[/FONT]

[FONT=Courier New]gotoAndPlay(destination);//without quotes since destination is a variable[/FONT]

Ah thank you soo much. Speedy response too! Have a lolly.

Welcome :wink: