I am having a lot of difficulty in using modules in AIR applications.
First issue is that the modules do not create SWF when I compile the application, either when running from FB or when compiled to an AIR file. So I created a standard application, and linked to the src folder in my AIR project. Now I get the compiled SWF, however, the module still doesn't load when I run the AIR project. The module loads fine when I run the standard application project.
<s:Panel includeIn="Tasks" left="10" top="53" bottom="10" right="10" id="modulePanel">
<mx:ModuleLoader id="mod" left="0" top="0" bottom="0" right="0" url="modules/modTaskList.swf"/>
Any help or suggestions would be greatly appreciated! I've been unable to find any useful documentation on this. There must be a guide to using modules in AIR applications.
I tried to load module in FB4/Air2 and everything worked fine. Here are the possible problems come to my mind:
- Did you add your module into Project --> Properties --> Flex Modules ?
- What is the location of your modules folder ? I used in src/Modules in my example.
- Is your modules folder path is true?
Maybe you missed one of them
You need to put your module back in the original project, go to project properties, Flex Modules and add the file there.
That will ensure the module SWF gets generated and loads correctly from your app.