PDA

View Full Version : goto


tonicastro
04-20-2006, 08:37 AM
Hi,

Sorry if my english is poor. I have a problem that maybe has a very simple resolution but I can't find it.
I have a button that sends the movie to a frame which target is a combination of variables.
I mean, for example,

on (release) {
*gotoAndPlay("tree"+i+"blue");
}

where tree+i would be tree1blue, tree2blue, tree3blue depends on the i value. The "i" value was assigned before.

But it doesn't work. you know why?


thank you,

tonicastro.com

tonicastro
04-20-2006, 09:28 AM
I made a mistake typing, sorry... this "*" was not included. This is the correct sentences

on (release) {
gotoAndPlay("tree"+i+"blue");
}

oldnewbie
04-20-2006, 03:48 PM
Have you tried...

myTarget = "tree"+i+"blue";

on (release) {
gotoAndPlay(myTarget);
}

tonicastro
04-20-2006, 07:06 PM
Ok! that simple! I knew it! I'd like to thank you very much for your information. I'll invite you, if you have a few minutes, to take a look at my web, and if you like, give me your opinion. I made it two years ago, and I think I've learn a lot since then... but... let me think... considering the question I made, maybe not too much :o

Thanks a lot,

Toni


www.tonicastro.com

oldnewbie
04-20-2006, 09:24 PM
;)