Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
if anyone knows some basic Actionscript i could really use your help:

i have a button with an if/else statement block... if the play head is at frame 40 currently, then the play should be directed to the "Red" frame label within the movie clip called "MC", if not then the playhead should be directed to "Purple" frame label within "MC"...

i've tried writing so many different ways, including _parent, _root, etc. but it's just not registering at all...

Code:
on (release) {
	if (_currentframe != 40) {
		_root.MC.gotoAndPlay("Purple");
	} else {
		_root.MC.gotoAndPlay("Red");
	}
}

Here is my small FLA file which shows you what i'm trying to do... i'm assuming that maybe i'm forgetting something like naming an instance, eventhough i've checked and rechecked... i know i can do this by not making a MC in the first place and just use the main timeline (surprisingly my if/else statement block works fine if i'm calling frame labels on the main timeline), but this is a small example of a much larger project, so i have to have it work this way.

i'm using Flash CS3 and actionscript 2.0

any help would be appreciated.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.