动作脚本3让鼠标慢慢反应过来

时间:2014-02-19 12:25:54

标签: actionscript-3 delay mouseover movieclip event-listener

我的一些影片剪辑上有一个鼠标悬停在事件监听器上。当鼠标悬停在它们上面时,我希望它们可以缩放。除了鼠标结束之间的延迟2或3秒以及屏幕上实际发生的事情之外,它的效果非常好。为什么? TY

package 
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.display.SimpleButton;
import flash.display.Stage;
import flash.text.TextField;
import flash.text.TextFormat;
import flashx.textLayout.formats.Float;

public class Airport extends MovieClip
{
    //-----------------------------------------------------------------------------

    public static var collectedMovieClipsArray:Array = new Array();
            public static var ROUTING:boolean = true;


    // ----------------------------------------------------------------------------


    // ----------------------------------------------------------------------------

    public function Airport(navninput, bynavninput)
    {
        collectedMovieClipsArray.push(this)

        this.addEventListener(MouseEvent.CLICK, clickHandler);
        this.addEventListener(MouseEvent.MOUSE_OVER, hoverHandler);
    }



    private function hoverHandler(evt:MouseEvent):void
    {
        if (ROUTING == true)
        {
            this.alpha = 60;
            this.width = 2*this.width;
            this.height = 2*this.height;
            this.addEventListener(MouseEvent.MOUSE_OUT, awayHandler);
        }
    }

    private function awayHandler(evt:MouseEvent):void
    {
            this.width = 13;
            this.height = 13;
    }




}
}

1 个答案:

答案 0 :(得分:0)

低fps和/或swf因数学或图形而过载。你缩放了多少,尺寸是多少?你正在进行缩放过渡吗?更多细节总是有帮助的。