Search code examples
htmlflashiframeactionscriptgoogle-swiffy

ActionScript - Click and Go to URL, Open on current tab


I have created a flash animation with actionscript (which I don't know very much about) and I've converted it to html5 with swiffy.

I was wondering is it possible that when a "click and go to web page" button is clicked that the URL is opened in the current tab and not a new one? I've tried googling it and nothing comes up.

This is the actionscript as it appears in flash.. I'll spare you the code swiffy generates!

forumgo.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage(event:MouseEvent):void
{
navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
}

Solution

  • Change the "_blank" to "_self", it should work when converted.

    navigateToURL(new URLRequest("http://www.adobe.com"), "_self");