Reputation: 18948
I want to check the RGB color of the object using actionscript in flash. The name of the object is object1. I checked like this but it didnt worked. help me
if (object1.color=rgb(255,0,255))
{
trace("Selected Pink");
}
Give me correct syntax to check the rgb color of the object
Upvotes: 0
Views: 681
Reputation:
how are you setting our objects color property? Is Color a String value? or a Number ex: 0xFF00FF.
Is rgb() a function that you created? or just pseudo code? How do you want this comparison to work?
Upvotes: 0
Reputation: 34253
I think the comparison operator in Actionscript needs to "=" signs.
if (object1.color == rgb(255,0,255))
Upvotes: 2