clickTag using ActionScript 3

I was having issues finding a good script for clickTags in AS3 so here are some I found:

//////////////////////////////////////

clickTag_bn.addEventListener(MouseEvent.CLICK, onMouseClick);
function onMouseClick(event:MouseEvent):void {
navigateToURL(new URLRequest(clickTag), “_blank”);
}

//////////////////////////////////////

or

//////////////////////////////////////

movieClipName.addEventListener(MouseEvent.MOUSE_UP, myclickTag);

function myclickTag(evt:MouseEvent):void {
var url:String = root.loaderInfo.parameters.clickTag;
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, ‘_blank’);
} catch (e:Error) {
trace(“Error occurred!”); }
}

//////////////////////////////////////

Advertisements

2 thoughts on “clickTag using ActionScript 3

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s