Sowmya
Sowmya

Reputation: 26969

Flash linking to external file

Here is the script am using to open an external html file from moviclip but it is opening in new tab. How to make it open in the same window?

function ShowDesignerhome(event:MouseEvent):void {
    var targetURL:URLRequest = new URLRequest("77.html");
  navigateToURL(targetURL);

Upvotes: 0

Views: 2276

Answers (2)

Hawks
Hawks

Reputation: 534

Simply add a second parameter to your navigateToURL call

navigateToURL(targetURL, "_self");

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/package.html#navigateToURL()

Upvotes: 1

Marty
Marty

Reputation: 39456

Add "_self" as the second argument for your call to navigateToURL(). More information:

navigateToURL(targetURL, "_self");

Parameters

request:URLRequest

window:String (default = null) — The browser window or HTML frame in which to display the document indicated by the request parameter. You can enter the name of a specific window or use one of the following values:

"_self" specifies the current frame in the current window.
"_blank" specifies a new window.
"_parent" specifies the parent of the current frame.
"_top" specifies the top-level frame in the current window.

PS. Please make use of the "accept" button next to answers (this goes for answers on your current questions).

Upvotes: 1

Related Questions