Skip to content

Instantly share code, notes, and snippets.

@kayue
Created October 14, 2010 10:30
Show Gist options
  • Save kayue/625994 to your computer and use it in GitHub Desktop.
Save kayue/625994 to your computer and use it in GitHub Desktop.
Script for a clickale button in AS3
/**
* Script for a clickale button in AS3
*/
var paramList:Object = this.root.loaderInfo.parameters;
// FYI, buttonClip is a symbol
buttonClip.addEventListener(MouseEvent.CLICK, openURL);
function openURL(evtObj:MouseEvent):void {
if(paramList["clickTag"] == null) paramList["clickTag"] = "http://google.com/";
var request:URLRequest = new URLRequest(paramList["clickTag"]);
navigateToURL(request, "_blank");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment