Click here to Skip to main content
16,019,983 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a webpage that has some Flash content, the page includes a command button that once clicked it calls another webpage and opens it. The problem is that it is opening in a new tab and I want to open it replacing the HTML flash window.

This is the code for the button:

C#
enterSite.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_3);

function fl_ClickToGoToWebPage_3(event:MouseEvent):void
{
    navigateToURL(new URLRequest("http://www.mywebpage.com/webdesign"), "_blank");    
}
Posted

1 solution

Use _self instead of _blank
 
Share this answer
 
Comments
datt265 26-Nov-13 14:19pm    
When I am trying to replace _blank with _self and try it in a web browser nothing happens when clicking the button.

I have noticed that using _self and from CS6 I choose publish preview and select Flash a new browser tab opens.

Any ideas of why this happens?

I have also tried using :

ExternalInterface.call("open", "http://www.mywebpage.com/webdesign", "_blank");

and

ExternalInterface.call("open", "http://www.mywebpage.com/webdesign", "_self");

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900