thornemeister
thornemeister

Reputation: 39

How do you Target urls in actionscript 3?

How would you add a target="_self" function onto the buttons in this actionscript (as3) I need the buttons to open within the same browser window and not a new (_blank) window:

skype_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void
{
navigateToURL(new URLRequest("skype:mySkypeIdentifier"));
}
email_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseUpHandler);
function mouseUpHandler(event:MouseEvent):void
{
    navigateToURL(new URLRequest("mailto:[email protected]?subject=rts     Esolutions enquiry"));

}

Cheers, Andy

Upvotes: 0

Views: 1029

Answers (1)

danii
danii

Reputation: 5693

It's as simple as:

navigateToURL(new URLRequest("whatever"),"_self");

Check the Adobe documentation for navigateToURL for more info.

Upvotes: 2

Related Questions