Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import flash.display.Stage;
- import flash.display.DisplayObject;
- import flash.display.MovieClip;
- import flash.events.MouseEvent;
- var btn1:MovieClip = new newbutton();
- var rotationz:Number = 0.5;
- btn1.x = 300;
- btn1.y = 250;
- stage.addChild(btn1);
- btn1.addEventListener(MouseEvent.MOUSE_DOWN, rotationness);
- btn1.addEventListener(MouseEvent.MOUSE_UP, rotationness);
- function rotationness(e:MouseEvent) {
- btn1.alpha = rotationz;
- rotationz += 0.1;
- if (rotationz >= 1) {
- rotationz = 1;
- }
- else if (rotationz < 0) {
- rotationz = 0;
- }
- }
- //btn1.addEventListener(MouseEvent.click);
Add Comment
Please, Sign In to add comment