I have some code that uses an ArrayCollection, it imports:
import mx.collections.ArrayCollection;
then:
static protected var myAC:ArrayCollection = new ArrayCollection();
Seems straightforward, but in my project the import (and thus ArrayCollection) are not found/defined!
I am using Flash Builder 4 (Flex 4) - it's an ActionScript project, and project properties is set to Flex SDK 4.0. Everything should be default settings.
When I type "import mx." and press control-space (autocomplete), I see a list of choices such as core, geom and several others, but no 'collections'.
I must be missing something?
By default, an "ActionScript Project" does not include the framework.swc which contains the flex packages such as mx.collections. If you really want to use ArrayCollection, you'll have add the swc and its corresponding resource bundle swc to your project library path. They are located at:
${FLEX_SDK_HOME}/frameworks/libs/framework.swc
${FLEX_SDK_HOME}/frameworks/locale/${locale}/framework_rb.swc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With