Jump to content

{Self Solved} [Question] Action Script 3 URLRequest Target e.g. _self, _blank

1 post in this topic

Recommended Posts

ok i've got a button that has and instance name of close_btn and when i add the code to it it works until i try to specify a target


close_btn.addEventListener(MouseEvent.CLICK, callLink);

function callLink:void {

 var url:String = "http://site";

 var request:URLRequest = new URLRequest(url);

 try {

navigateToURL(request, '_self');

 } catch (e:Error) {

trace("Error occurred!");




i'm no actionscript ninja but i can fight my way in and out but this seems like i'm way overthinking it like i tend to do


Thank You in advance for any help





alright i fixed it, yes i was overcomplicating it.


close_btn.addEventListener(MouseEvent.CLICK, callLink);
function callLink(event:MouseEvent):void {
var url:URLRequest = new URLRequest("http://www.adobe.com"); navigateToURL(url, "_self"); 
trace("You Clicked the Close button");

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.