Question

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

Was it helpful?

Solution

I think the comparison operator in Actionscript needs to "=" signs.

if (object1.color == rgb(255,0,255))

OTHER TIPS

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top