PDA

View Full Version : Help with goto string of a labelled frame


bcorwen
12-04-2006, 01:44 PM
Hi everyone!

I'm starting this again as I have progressed a little, but am now stuck again.

All I would like someone to help me with is this:
I'd like the first string in an array, when called for, to change a movie clip on the stage to go to a corresponding frame.

I have a goto with the Array.shift as the frame label I want to go to. However this isn't working, the movie clip will stay on it's first frame. Do I have to turn the string into a number corresponding to the frame I want?

Thanks, Mike

anonymous
12-04-2006, 02:28 PM
label_array = ["label1", "5"];

on (release) {
mc1.gotoAndStop(label_array[0]);
}

on (release) {
mc2.gotoAndStop(label_array[1]);
}

bcorwen
12-05-2006, 09:03 AM
Thanks, I've got it working now.

Looking back at what I had originally, I guess it didn't work because the array[0] was in inverted commas so was taken as a string.