Vars/ifstatements

Iam having this problem with some actions:
what iam trying to do is use a button on the main stage to change a frame of a symbol through some variables


on (release) {
set("paint",black);
}

is the button on the main stage that sets the thing


onClipEvent(enterFrame) {
if (_root.paint = "black") {
	_root.car.f1.kit.gotoAndStop("black");
	} else {
	_root.car.f1.kit.gotoAndStop("desert"); }

}

is the actionscript of ‘f1’ symbol inside the car symbol, kit is inside f1 and iam trying to make it play a frame labeled above, i would just tell it to play a frame, but theres like a thousend other objects in this movie.

thanks

Assign the value to the variable as a string.
[AS]paint = “black”;
// or
set(“paint”, “black”);[/AS]
And you use the equality operator (==), not the assignment operator (=).
[AS]if (_root.paint == “black”) {[/AS]

thanks alot
now we can jump for joy with 40s in our hands :slight_smile:

Hehe - No problem. :wink: