Posted By

ImJustRestless on 04/16/11


Tagged


Versions (?)

loop event buttons


 / Published in: ActionScript 3
 

  1. var btn_list:Array = [aa,aa1];/// List All Buttons for Tracking [ Exits & Engagements ]
  2.  
  3. for (var j:uint = 0; j < btn_list.length; ++j)
  4. {
  5. //ActivateButton.Activate([videoThumbs[j].thumb_mc,videoThumbs[j].large_mc]);
  6. btn_list[j].addEventListener(MouseEvent.MOUSE_OVER, clickHandler);
  7. btn_list[j].buttonMode = true;
  8. btn_list[j].useHandCursor = true;
  9.  
  10. }
  11.  
  12.  
  13. private function clickHandler(e:MouseEvent):void
  14. {
  15. if (e.currentTarget.name == "aa")
  16. {
  17. navigateToURL(new URLRequest(stage.loaderInfo.parameters.url));
  18. MeeboAd.track('click', 'logo_clicked');
  19. trace("clicked" + e.currentTarget.name)
  20. }
  21. else if (e.currentTarget.name == "aa1")
  22. {
  23. navigateToURL(new URLRequest(stage.loaderInfo.parameters.url));
  24. MeeboAd.track('click', 'order_online_clicked');
  25. trace("clicked" + e.currentTarget.name)
  26. }
  27. }

Report this snippet  

You need to login to post a comment.