A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: NavigateToURL opening in New Window even with _Self

  1. #1
    Junior Member
    Join Date
    Feb 2009
    Posts
    2

    NavigateToURL opening in New Window even with _Self

    Strange Behavior in a flash I'm working on. And I must be doing something wrong because I can reproduce it in every flash I create. You can check out the behavior here at a test page on my under construction site: http://www.i2craptor.com/
    I have a menu bar at the top of the page, with the following code:

    btnHome.addEventListener(MouseEvent.CLICK,btn1Clic kHandler);
    function btn1ClickHandler(event:MouseEvent):void{
    navigateToURL(new URLRequest("http://www.i2ctech.com/"),"_Self");
    }
    btnProducts.addEventListener(MouseEvent.CLICK,btn2 ClickHandler);
    function btn2ClickHandler(event:MouseEvent):void{
    navigateToURL(new URLRequest("products.html"),"_Self");
    }
    btnSupport.addEventListener(MouseEvent.CLICK,btn3C lickHandler);
    function btn3ClickHandler(event:MouseEvent):void{
    navigateToURL(new URLRequest("support.html"),"_Self");
    }
    btnResources.addEventListener(MouseEvent.CLICK,btn 4ClickHandler);
    function btn4ClickHandler(event:MouseEvent):void{
    navigateToURL(new URLRequest("resources.html"),"_Self");
    }
    btnCompany.addEventListener(MouseEvent.CLICK,btn5C lickHandler);
    function btn5ClickHandler(event:MouseEvent):void{
    navigateToURL(new URLRequest("company.html"),"_Self");
    }
    btnPress.addEventListener(MouseEvent.CLICK,btn6Cli ckHandler);
    function btn6ClickHandler(event:MouseEvent):void{
    navigateToURL(new URLRequest("press.html"),"_Self");
    }
    Here is the crazy thing. If I open up a web browser and then click the menu buttons, the buttons open the link up in a new page. Once the NEW page opens, the menu buttons start acting as I would expect, then opening any further links in the same web page. Is this some internet explorer security setting? Every computer that I have utilized (total of 5) to view the web page exhibits this same behavior.

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Use "_self" (not capital). Also you might have to set AllowScriptAccess.

    http://board.flashkit.com/board/showthread.php?t=757616

  3. #3
    Junior Member
    Join Date
    Feb 2009
    Posts
    2

    Smile Problem Solved

    That did it. Thanks. I didn't catch that. Works perfectly now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center