AdRime Mouse Over


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



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.