On clip event enter frame question

Hi Guys,

I have two buttons and a light blue circle. When you press the second button from the left, it changes the variable name to “boxTwo”.

In the circle video clip I have a enterframe with a condition to say, if the name is “boxTwo” play an animation, but it doesn’t work. Anyone know why?

Button:



on(release){
	var name = "boxTwo";
	_root[name].gotoAndStop(12);
	trace(name);
}


On the circle MC that contains the animation



onClipEvent(enterFrame){
	trace(_root.name);
	if(_root.name == "boxTwo"){
		circle.gotoAndPlay("loop");
	}
}


Any ideas? Thanks :slight_smile: