Jump to content

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


  • Please log in to reply
No replies to this topic

#1
SilentViper

SilentViper

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 119 posts
  • Gender:Male
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");
}






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy