3 Replies Latest reply on Sep 14, 2010 5:27 PM by Flex harUI

    Unloading a Module via an exit button on Window component

    edwinmerced Level 1

      This is a Flex 4 project.


      I have a module create with MXML.


      The module uses the window component.


      How do I use the "x" (exit button) on the window component to unload the module?


      This is part of my code on the main application:


          private function displayModule( moduleURL:String ):void
                      if( moduleLoader.url != moduleURL )
                          moduleLoader.url = moduleURL;




      <s:Button x="23.35" y="50.85" label="1a" width="50" height="50" id="A1" click="displayModule('windowA1.swf');"/>


      <mx:ModuleLoader id="moduleLoader" width="100%" height="100%"  x="150" y="25"/>


      Thanks for any help