2 Replies Latest reply on Oct 22, 2010 11:08 AM by -skitch-

    Passing Parms from click-event to function and "child"

    learner_doug Level 1

      Thanks to help on this Forum, I'm able to pass parms into a custom PopUp based on TitleWindow created with the PopUpManager from a click-event.  Now I'd like to also pass parms to modify a click-event handler on the PopUp itself.  Can this be done?  Here is the code for the click-event in the PopUp:

       

       

      //From Main MXML file - creates the PopUp:

      private

       

       

      var popup:owPopUp = new owPopUp();

       

      protected function owPopUpWindow(event:MouseEvent, title:String, url1:String):void

      {

      PopUpManager.addPopUp(popup,

      this, true);

      popup.title = title;  // title="{titleText}" in the <s:TitleWindow...> tag.

      popup.x=200;

      popup.y=125;

      }

       

      //Code for the click-event (some text in a text area)

      click="owPopUpWindow(event,

      'EBS New: Order Writer - Milestone 1 Queue', 'lessons/EBS_new_Milestone1.swf')"  //third parm is what I want to pass to function in the PopUp TitleWindow (underlined)

       

      //In the PopUp TitleWindow that is created by the above-code:

      ...

      [

      Bindable] public var titleText:String ="";

      [Bindable] public var url1:String = "";

      protected

       

       

      function textarea1_clickHandler(event:MouseEvent):

      void

      {

       

      this.move(1,1);

      loader.load(

      "url1");  // this URL is where I'd like to pass in a parm from the click-event above "url1"

      }

       

      protected function pdfLoader(event:MouseEvent):void

      {

       

      //navigateToURL(new URLRequest(url2));  also want to pass in parm for this URL "url2"

       

      }

       

      The title part works, but the url1 part does not.  No errors, just no load.  Any suggestions?

       

      Thanks.