/ Published in: ActionScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// _ AS2 _ on (release){ getURL(_root.clickTag,"_blank") } ________________________________________________________________________________________ // _ AS3 _ buttonMode=true; addEventListener(MouseEvent.CLICK,vOpen); function vOpen(event:MouseEvent):void { navigateToURL(new URLRequest(findVar("clicktag")), findVar("clicktarget")); } function findVar(vari:String):String { for (var key:String in root.loaderInfo.parameters) if(key.toLowerCase()== vari) return root.loaderInfo.parameters[key]; return ""; }