【发布时间】:2011-07-03 21:30:16
【问题描述】:
我已经在 Flash 中为某个元素设置了悬停和悬停补间,当您将鼠标悬停在某个元素上时,一个信息窗口会从底部滑入,当您悬停时它会滑回。悬停,当我在悬停动画结束之前悬停时,给定的对象会跳到第一个动画的末尾并返回。当有人将鼠标悬停在某物上时,如何使动画轻松进出?
function initialPlacement()
{
block1.x = (-814);
block1.y = (stage.stageHeight - 100);
}
initialPlacement();
tension.addEventListener(MouseEvent.ROLL_OVER,hover1);
tension.addEventListener(MouseEvent.ROLL_OUT,off1);
function hover1(event:MouseEvent):void{
hover1tween.start();
}
var hover1tween:Tween = new Tween(block1,"x",Regular.easeOut,(0-block1.width),0,30,false);
hover1tween.stop();
function off1(event:MouseEvent):void{
off1tween.start();
}
var off1tween:Tween = new Tween(block1,"x",Regular.easeInOut,0,(0-block1.width),30,false);
off1tween.stop();
initialPlacement();
【问题讨论】:
-
感谢编辑,我不知道如何格式化这里的内容。
标签: actionscript-3 tween