Reputation: 10412
Is there a way to make flash content open a new tab to a link specified once clicked using either javascript or HTML?
I tried many ways but cannot seem to make this work and Flash content itself is not clickable to a link
Upvotes: 0
Views: 42
Reputation: 456
Flash content can have clickable links, so using JavaScript or HTML may not be necessary.
The ActionScript 3 function flash.net.navigateToURL(request:URLRequest, window:String)
can be used to open webpages exactly like links do. The argument window
specifies which window to open the page in ("_self"
for the same page, "_blank"
in a new window or tab).
For example, in ActionScript 3:
myButton.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler (event:MouseEvent):void {
var url:URLRequest = new URLRequest("http://example.com");
flash.net.navigateToURL(url, "_blank");
}
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/package.html
Upvotes: 1