"alpha" vs "visible"
circ is my object
I set the property to
I have been using alpha
is there an advantage to using one or the other?
trivial, maybe but inquiring minds want to know
Same effect. Different results.
Alpha = 0 sets the transparency of an object to 0 (i.e. it's not visible anymore).
Visible = false removes the object from the display list temporarily but it does NOT delete the object. So, if needed, the object can be recalled by setting visible=true. So, using the visible property frees up some system resources.
Another advantage (if this is the desired effect) is that visible = false objects cannot take mouse events, whereas alpha = 0 can. Sometimes what happens is that there are alpha=0 objects still left on the stage and even though they aren't visible, still perform the actions as if they were.
So, if the goal is to remove an object from the display list (i.e. put it away in storage, so to speak), then use visible. If it's for a tween, etc... use alpha. Even with tweening, I usually set the object to visible = false in the callback function.
The Following User Says Thank You to Medyman For This Useful Post:
That makes alot of sense.
BTY I did get that cursors thing to work in As3 -not as pretty though.