1 Reply Latest reply on Feb 4, 2010 12:54 AM by archemedia

    Clickhandler even between modules ....

    aktell2007 Level 1

       

      I’m trying in a very simple way to find out how to activate a CLICK handler event between two modules! (From one to another)

       

      Module one code: Btn calling submitHaqndler.

      <mx:Metadata>
      [Event(name="submit", type="flash.events.Event")]
      </mx:Metadata>
           
      <mx:Script>
      <![CDATA[
      
      public static const SUBMIT:String = "submit";
           
      private function submitHandler():void {
      
      dispatchEvent( new Event(SUBMIT));
      }
      ]]>
      </mx:Script>
      

       

      Module two code:

      <mx:Script>
      <![CDATA[
      private var myModCom:Object;
      
      private function moduleComHandler(e:Event):void {
      
      myModCom = step30.child as Object;
      myModCom.addEventListener( "submit", ??? Calling ??? );
      
      ??? From here it schould automaticly do the CLICK
      of the Btn which activates the module step30 ???
      }
      ]]>
      </mx:Script>
      
          <mx:ModuleLoader 
               id="step30"
              url="ContactEntry.swf"
              ready="moduleComHandler();"/>
                
                
                   <mx:Button id="btnToBeClicked"/>
      
                   I did not include all the extra code which is in
                   the Btn calling the module!
      

       

      If somebody has an idea? Any help much appriciated aktell 2007