flash on 2010-9-27
♥0 |
Line 46 |
Modified 2010-09-27 18:20:22 |
MIT License
archived:2017-03-20 01:20:09
ActionScript3 source code
/**
* Copyright ushisantoasobu ( http://wonderfl.net/user/ushisantoasobu )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/8Vqo
*/
package {
import flash.display.Sprite;
import caurina.transitions.Tweener;
import caurina.transitions.properties.FilterShortcuts;
import flash.events.MouseEvent;
[SWF(width=465, height=465, framerate=30, backgroundColor="0xffffff")]
public class FlashTest extends Sprite {
public function FlashTest() {
var ball:Sprite = new Sprite();
ball.x = 100;
ball.y = 100;
ball.alpha = 0.8;
ball.graphics.beginFill(0x000000);
ball.graphics.drawCircle(0,0,40);
ball.graphics.endFill();
addChild(ball);
FilterShortcuts.init();
ball.addEventListener(MouseEvent.MOUSE_OVER, ballMouseOverHandler);
ball.addEventListener(MouseEvent.ROLL_OUT, ballRollOutandler);
ball.buttonMode = true;
}
private function ballMouseOverHandler(e:MouseEvent):void{
Tweener.addTween(e.target, {
scaleX:1.4,
scaleY:1.4,
time:0.4,
alpha:0.4,
//_DropShadow_angle:degrees,
//_DropShadow_distance:10,
_DropShadow_blurX:40,
_DropShadow_blurY:40,
transition:"easeOutCubic"
});
}
private function ballRollOutandler(e:MouseEvent):void{
Tweener.addTween(e.target, {
scaleX:1,
scaleY:1,
time:0.2,
alpha:0.8,
//_DropShadow_angle:degrees,
//_DropShadow_distance:0,
_DropShadow_blurX:0,
_DropShadow_blurY:0,
transition:"easeOutCubic"
});
}
}
}