Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1097045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:22:20+00:00 2026-05-17T00:22:20+00:00

I am playing with a Flex 4 / Air 2 project, that loads Modules

  • 0

I am playing with a Flex 4 / Air 2 project, that loads Modules at runtime. I can include intrinsic MX classes in my module and all works fine (eg: import mx.controls.Alert).

I can also include my own classes – however, only if the class is in the same folder as the module.

eg:

<?xml version="1.0"?> 
<mx:Module> 
    <mx:Script> 
        <![CDATA[ 
        import mx.controls.Alert; // works
        //import MyTestClass;       // works if MyTestClass.as is in same folder as module
        //import Classes.MyTestClass; // throws compiler error


    ]]> 
    </mx:Script> 
</mx:Module> 

Folder structure:

.
|-- Classes
    |-- MyTestClass.as
|-- Modules
    |-- MyModule.mxml
`-- application.mxml

So When I attempt to compile my Module, when importing “Classes.MyTestClass”, the compiler throws the following error:

“Error: Definition Classes:MyClass
could not be found”

I know that the path to the Class is correct, and if I compile the project as an application, rather than a module, all is AOK.

Additionally, if I import “Classes.MyTestClass” in the parent application, all is fine. So I guess I am missing a compiler option to include these classes in the module, but have no idea what!
This is how I am compiling the module:

mxmlc
-static-link-runtime-shared-libraries=true
-load-externs=../obj/exclude.xml -isolate-styles=false ../src/Modules/MyModule.mxml

“../obj/exclude.xml” is the link report from the “Parent” application.

Can anyone help as to what I am missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:22:20+00:00Added an answer on May 17, 2026 at 12:22 am

    You need to include you classes folder as a source path so the compiler can find that class.

    Append this command to mxmlc:

    -source-path /src/Classes
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently working on a flex AIR project based on PureMVC framework. There was a
I'm playing with Modules and they work as advertised: the module swf's ares built
First of all, I am sorry that this is not a 'question that can
I am creating one application in Adobe AIR with Flex 4.6. In that, I
Playing around with MongoDB and NoRM in .NET. Thing that confused me - there
I am working in on a Flex / Air application (using PureMVC) written virtually
I was playing with flex and bison today, and something kind of eerie came
Flex has the SoundMixer.computeSpectrum function that lets you compute an FFT from the currently
Having had a quick look at the Flex docs I can't seem to find
Rats! I'm doing a by-the-book sound playback in Flex and I can't hear it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.