SHARE
TWEET

Untitled

a guest Jun 19th, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package{
  2. import flash.display.MovieClip;
  3. import flash.events.*;
  4. import fl.transitions.Tween;
  5. import fl.transitions.easing.*;
  6. public class menutype extends MovieClip {
  7. public function menutype(){
  8. this.addEventListener(MouseEvent.MOUSE_OVER,sortir);
  9. this.addEventListener(MouseEvent.MOUSE_OUT,rentrer);
  10. this.addEventListener(MouseEvent.CLICK,loin);
  11. this.buttonMode=true;
  12. this.mouseChildren = false;
  13. }
  14. private function sortir(ev:MouseEvent){
  15. if(MovieClip(parent).encours!=this) var effet = new Tween(this, "y", Bounce.easeOut,this.y,280, 1, true);
  16. }
  17. private function rentrer(ev:MouseEvent){
  18. if(MovieClip(parent).encours!=this) var effet = new Tween(this, "y", Bounce.easeOut, this.y,368, 1, true);
  19. }
  20. private function loin(ev:MouseEvent){
  21. var effet = new Tween(this, "y", Bounce.easeOut, this.y,200, 1, true);
  22. if(MovieClip(parent).encours!=null)
  23. {
  24. var effet2 = new Tween(MovieClip(parent).encours, "y",
  25. Bounce.easeOut, MovieClip(parent).encours.y,368, 1, true);
  26. }
  27. MovieClip(parent).encours=this;
  28. }
  29. }
  30. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top