Code on Objects in AS3

Code on objects, including on() and onClipEvent(), are no longer supported in ActionScript 3.0. The Flash 9 preview still allows you to put code in there, but if you compile you’ll get the following error:

WARNING: ActionScript 3.0 does not support actions on button or MovieClip instances. All scripts on object instances will be ignored.

This is great news for all of us Flash Developers that are sick and tired of hunting through FLA files to find code buried on objects. :)

All events in AS3 will be running through the new and improved Event Framework built-in to Flash Player 9. This allows for consistent event implementation across all built-in and custom objects, since there is now only one event system.

One thought on “Code on Objects in AS3

  1. leafpure

    Hi,
    I am desperately needing your help. I am not a developer and not a programmer, yet I learned Flash and I use it for web, but suddenly I got this message:
    Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored.

    And I have no idea what to do now.
    I published my movie as usual in AS2 for player 8, and still, I got this message. What’s worse, all my stop actions stopped working literally. I don’t know what to do with it since I don’t know the script.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *