There is no explicit project type for modules in Flex Builder 2. To
create a module in Flex Builder, you treat the module as an MXML
application and compile it. 

There are two basic approaches:

1) One-project model: Create the modules in the same project as your
application and add them to the application list. This approach works as
long as the application and the modules share the same compiler settings
(such as library path).
To debug the application with modules, reference the debug SWF file from
source code during development, and switch to the non-debug one when you
are ready to deploy. 

2) Multiple-project model: Create a separate Flex or ActionScript
project for each module. Add a linked file to the source folder of your
shell projects that want to use it. This copies the module's SWF file
over at shell project build time. 
Alternatively you could point the module project's output folder at your
shell project's output folder, but a linked file is better.
To support debugging, point the link at the debug SWF file and change
that when you are ready to deploy, without altering source code.

My apologies for not getting this into the proper documentation. I am
currently working on a section about compiling modules with Flex Builder
that will be added to livedocs. The reality is that Flex Builder 2.0.1
does not have explicit support for modules. What you need to do (what
you have already figured out) is someone hacky.

I'll post to this list when the livedocs pages have been updated.

-matt horn
flex docs

> -----Original Message-----
> From: [email protected] 
> [mailto:[EMAIL PROTECTED] On Behalf Of phillips1021
> Sent: Monday, January 08, 2007 8:13 AM
> To: [email protected]
> Subject: [flexcoders] Re: Compiling modules
> 
> Great question. I've run into the same problem. How do you 
> use Flex Builder to compile just the module?
> 
> The only work-around I've found so far is to right-click on 
> the module name in the navigator panel and select Run As Flex 
> Application. This command will create a .swf and .html files 
> for the module and try to load it in the browser (where 
> nothing will display). 
> 
> It's not the best solution and I hope someone posts a better 
> one, but it is all I've found to work so far.
> 
> I did search through the Flex 2.0.1 help files but did not 
> find anything.
> 
> Bruce
> 
> 
> 
>  
> 

Reply via email to