flash on 2010-6-29
♥0 |
Line 39 |
Modified 2010-06-29 11:48:05 |
MIT License
archived:2017-03-20 02:46:07
ActionScript3 source code
/**
* Copyright plus-tic ( http://wonderfl.net/user/plus-tic )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/xyK6
*/
package {
import flash.display.Shape;
import flash.events.MouseEvent;
import flash.display.AVM1Movie;
import flash.display.Sprite;
import caurina.transitions.*;
public class Main extends Sprite {
public var rr:Sprite = new Sprite();
public var or:Sprite = new Sprite();
public var flag:Boolean = true;
public function Main() {
rr.graphics.beginFill(0);
rr.graphics.drawRoundRect(-75,-15,150,30,5);
rr.x = stage.stageWidth/2;
rr.y = stage.stageHeight/2;
addChild(rr);
rr.buttonMode = true;
or.graphics.beginFill(0x333333);
or.graphics.drawRoundRect(-75,-15,150,30,5);
or.x = stage.stageWidth/2;
or.y = stage.stageHeight/2;
or.alpha = 0;
addChild(or);
or.buttonMode = true;
this.addEventListener(MouseEvent.CLICK,ch);
this.addEventListener(MouseEvent.MOUSE_OVER,oh);
this.addEventListener(MouseEvent.MOUSE_OUT,ouh);
}
public function ch(e:MouseEvent):void{
Tweener.addTween(e.target, { transition:"easeInout", time:2,z:-500} );
}
public function oh(e:MouseEvent):void{
or.alpha = 1;
}
public function ouh(e:MouseEvent):void{
or.alpha = 0;
}
}
}