Compiling a Flex project from the command-line

I can’t seem to get a Flex ‘project’ to compile all-together from the command-line. I have some ActionScript classes in sub-folders, as well as some mxml components in sub-folders, and the main mxml application in the root folder. I’m using the basic: “mxmlc main.mxml” command, but it tells me that it does not know what my custom ActionScript classes are or where to find them. In other words, I think that they have not been “compiled”. I had this working for an earlier custom Actionscript class, but I can’t remember what I did!

Solution:

Flex’s “mxmlc” compiler automatically searches sub-folders within your root package directory for source files, you don’t need to specify them on the command line. The reason mxmlc was complaining that it “did not know what my custom ActionScript classes were” was because I forgot to import my custom event file in the class I used it in!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s