Hi,

I build a very simple actionscript project with Flex builder 3. The code is 
listed here:

package {
        
        import flash.display.Sprite;
        import mx.collections.ArrayCollection;

        public class test1 extends Sprite
        {
                private var ac:ArrayCollection;
                
                public function test1()
                {
                }
        }
}
I get the errors:
1046: Type was not found or was not a compile-time constant: ArrayCollection. 
1172: Definition mx.collections:ArrayCollection could not be found.     

it seems the error happen at  

import mx.collections.ArrayCollection;

but when I build  a Flex project(like follow),I do not get the error

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
        <mx:Script>
                <![CDATA[
                        import mx.collections.ArrayCollection;
                        private var ac:ArrayCollection
                ]]>
        </mx:Script>
</mx:Application>

How to use ArrayCollection for ActionScript project?

Thanks

Mark 

Reply via email to