Created
October 14, 2010 10:30
-
-
Save kayue/625994 to your computer and use it in GitHub Desktop.
Script for a clickale button in AS3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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