Skip to content

Macromedia Components & Object.prototype Don’t Get Along

Categories: Flash

Table of Contents

In most of my flash projects I have a prototype file I include into the project. It contains additions to core objects such as Object, MovieClip, etc. Well, today I found out that some Macromedia components (ComboBox was the one I was having trouble with) don’t like additional methods to be defined on certain classes (Object was the one I found that ComboBox was having issues with); they fail to continue to work with additional methods defined.

However, there is a workaround: ASSetPropFlags. Simply hide all additional methods with this line of code: [code lang=”actionscript”]ASSetPropFlags(Object.prototype, null, 1);[/code]

I can’t wait until AS3 can be used all the time.

1 response to “Macromedia Components & Object.prototype Don’t Get Along

  1. I haven’t quite got my head around ASSetPropFlags yet. This is exactly what I was looking for.

    For the record, here are the components I have had this problem with:

    mx.controls.List
    mx.controls.ComboBox
    mx.controls.Menu

    I haven’t dug into what’s causing it since the EULA forbids us from distributing patches anyway. This workaround seems fine so far.

    Thanks 🙂

Leave a Reply

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

Keep in Touch

Subscribe to my email list to keep in touch. I’ll send you new blog posts and other thoughts.