0
votes

So I'm trying to make a 3 tier flash application where the main.as calles all the movieclips and addChild()'s them. those movieclip classes are situated in the com.ui package but somehow my app can't load them, they only load is I move my movieclip classes to the default package (the root folder).

How can I import those movieclips like this -> import com.ui.myMovieClip;

I'm using Flash CS5 and Flash Builder

1

1 Answers

0
votes

You need to create a folder with the following structure, whereas , folder contains the com folder that contains the ui folder etc...

/folder 
   / com
     / ui
       /your classes

In FlashBuilder , set folder as a SourcePath for your project. In your classes tree on the left you should see the com folder in one of the source paths.

Each class contained in the ui folder will be in a package such as

package com.ui
{
   //etc
}