This content has been marked as final. Show 2 replies
maybe make a function that changes the colour which is then active when onRelease happens. (Idea)
> How can I add an event like I want? (changing color
> of square instance when drop is complete).
Raising your own event may or may not be overkill, in this case. As
Star Tail Pro suggested, you may just want to call a function in the
button's existing on (release) event handler.
If you raise an event, you'll have to write an event listener to respond
to it. That's perfectly fine, of course, but on the one hand, you want to
advance your AS knowledge, and on the other, you're still using Flash 5-era
See Jen deHaan's "ActionScript 2.0 Best Practices," page 4 in
particular, to learn the newer approach (available since Flash MX [aka Flash
I would definitely start with that. Only then would I proceed to raising
custom events. For that, you could use either AsBroadcaster ...
... or EventDispatcher ...
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."