mx:Modules, are frakkin neat

I was talking to a potential client about using swf loader to build apps that coud use smaller apps as plugins more or less. IE.

"let’s use a data grid to show this information from the main app, instead of the chart we’re using now."

I knew that modules had been added to 2.0.1, and had seen Roger’s MAX Preso on the topic, so thought to try that approach, which requires less effort to get the modules to talk to each other and the parent app. Did some searching, and flexcoder s reading
 and found some great resources.

Bruce Phillips blog entry

Kevin Hammer’s entries (1) (2)

By far, what (more or less) solidified the concept, Peter Ent

before I found Peter’s entry, i wanted to just see if I could get the most basic example to work so…

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Panel Title="Module Loader" width="100%" height="50%">
        <mx:ModuleLoader url="iTunesModule.swf" id="mLoader" width="100%" />
    </mx:Panel>
   
</mx:Application>

And my module (even simpler)

<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Label text="I am a module. Hello" />
</mx:Module>

The result

One thought on “mx:Modules, are frakkin neat

Comments are closed.