January 17th, 2008
These files are from my presentation at the Pittsburgh Flash User Group (PittMFUG) tonight.
There are two sets of example files, both showing very basic custom events in AS3 — hence the name “BareBonesEvent”.
The first set (01 really basic) is an example of BareBonesEvent that is fired after the mouse is clicked 5 times. Nothing fancy there at all. But, if you’re looking for minimal custom event code, this is it.
The second set (02 basic wProperty) steps it up just a little. The BareBonesEvent is dispatched after the mouse is clicked five times again. But this time we also move a graphic a few pixels and pass the graphics new x position along with the event object.
ETA: If you’re wondering what happens if you don’t override the clone method, there’s a post on the bit-101 blog that explains a bit about what could happen: bit-1o1