1 Reply Latest reply on Oct 18, 2007 3:24 PM by TnaE

    Opening link in same window in AS3: Answer Inside

    TnaE
      enter_bttn.addEventListener(MouseEvent.CLICK, buttonCLickHandler);
      function buttonCLickHandler (event:MouseEvent) :void {
      navigateToURL(new URLRequest("http:www.tnae.net",));
      trace("I'm clicked");
      }


      I've tried adding _self and _parent but I can't get it to open in the same window. I get an error when using those two tags. I'm using ActionScript3 in Flash CS3 Pro.
        • 1. Opening link in same window
          TnaE Level 1
          Ok I finally got it to work and I'm going to post the solution for someone else searching for it:

          enter_bttn.addEventListener(MouseEvent.CLICK, buttonCLickHandler);
          function buttonCLickHandler (event:MouseEvent) :void {
          navigateToURL(new URLRequest("http:www.tnae.net") ,"_self");
          trace("I'm clicked");
          }



          After having tried _self before I noticed that in this instance its placed differently, as in outisde the 1st paranthese. This technique worked for me.