Posted By

adehaas on 10/17/13


Tagged

db


Versions (?)

AdRime Mouse Over


 / Published in: ActionScript
 

  1. import flash.events.MouseEvent;
  2.  
  3. stage.addEventListener(MouseEvent.MOUSE_MOVE, onHit);
  4.  
  5. var virgin:Boolean = true;
  6.  
  7. function onHit(event:MouseEvent):void
  8. {
  9. if(finalframe.cta.btn.hitTestPoint(mouseX, mouseY, true))
  10. {
  11. if(virgin)
  12. {
  13. finalframe.cta.btn.gotoAndPlay(2);
  14. virgin = false;
  15. }
  16. }
  17. else
  18. {
  19. if(!virgin)
  20. {
  21. finalframe.cta.btn.gotoAndPlay(11);
  22. virgin = true;
  23. }
  24. }
  25. }

Report this snippet  

You need to login to post a comment.