为了实现光标静止时候隐藏组件,模仿土豆youku的实现
import com.greensock.*;
import com.greensock.easing.*;
import flash.utils.Timer;
//这里是两个移动的动画an()回到原来位置an2()离开原来位置
function an():void{TweenLite.to(playpause_mc,1{x:5,y:337,ease:Quint.easeOut});}
function an2():void{TweenLite.to(playpause_mc,3{x:5,y:437,ease:Quad.easeOut});}
function onMouseMove(e:Event):void
{
an();
myTimer.reset();
myTimer.start();
}
this.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
var myTimer:Timer = new Timer(1000,1);
myTimer.addEventListener("timer", function() { if(mouseY < 330){an2();}});
myTimer.start();
但是到出swf后flvplay加载播放视频时候不行an2()没有运行。
不知道为什么?