AS2 / AS3 clickTag for banners


/ Published in: ActionScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // _ AS2 _
  2.  
  3. on (release){
  4. getURL(_root.clickTag,"_blank")
  5. }
  6. ________________________________________________________________________________________
  7.  
  8.  
  9. // _ AS3 _
  10.  
  11. buttonMode=true;
  12. addEventListener(MouseEvent.CLICK,vOpen);
  13. function vOpen(event:MouseEvent):void {
  14. navigateToURL(new URLRequest(findVar("clicktag")), findVar("clicktarget"));
  15. }
  16. function findVar(vari:String):String {
  17. for (var key:String in root.loaderInfo.parameters)
  18. if(key.toLowerCase()== vari)
  19. return root.loaderInfo.parameters[key];
  20. return "";
  21. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.