Mx.collections missing? ArrayCollection () in Flex4 (Flash Builder 4)

I have a code that uses ArrayCollection, it imports:

import mx.collections.ArrayCollection; 

then

 static protected var myAC:ArrayCollection = new ArrayCollection(); 

It looks like, but in my project the import (and therefore ArrayCollection) was not found / defined!

I am using Flash Builder 4 (Flex 4) - this is an ActionScript project, and for the project properties - Flex SDK 4.0. All settings must be set by default.

When I type "import mx." and press the space bar (autofill), I see a list of options, such as core, geom and several others, but not "collections".

Am I missing something?

+4
source share
2 answers
  • Export project to zip
  • Upgrading to FlashBuilder 4.1
  • Import project from zip
  • Forget about your mistake)
+1
source

By default, the ActionScript Project does not contain a framework.swc that contains flex packages such as mx.collections. If you really want to use ArrayCollection, you must add swc and the corresponding swc resource package to your path to the project library. They are located at:

 ${FLEX_SDK_HOME}/frameworks/libs/framework.swc ${FLEX_SDK_HOME}/frameworks/locale/${locale}/framework_rb.swc 
+8
source

All Articles