import caurina.transitions.Tweener;
//add Listener
mc.x=10;
mc.y=10;
mc.addEventListener(MouseEvent.MOUSE_OVER, U);//mouse event do "U"function
mc.addEventListener(MouseEvent.MOUSE_OUT, P);//mouse event do "P"function
function U(event:MouseEvent):void {
Tweener.addTween(mc, {
x: 10, //a property of the movieclip
y: 10, //a property of the movieclip
scaleX:2,//AS3: 0 to 1,1=100%
scaleY:2,//AS3: 0 to 1,1=100%
alpha: 0.5, //a property of the movieclip
time: 1, //required
delay: 0, //optional
transition: "easeOutQuad" //optional, default value is "easeOutExpo"
});
}
function P(event:MouseEvent):void {
Tweener.addTween(mc, {
x: 10, //
y: 10, //
alpha: 1, //
scaleX:1,//AS3: 0 to 1,1=100%
scaleY:1,//AS3: 0 to 1,1=100%
time: 1, //required
delay: 0, //optional
transition: "easeOutQuad" //optional, default value is "easeOutExpo"
});
}
No comments:
Post a Comment