[AS3] MouseEvent

實體名稱.addEventListener(MouseEvent.MOUSE_OVER,函式);
實體名稱.addEventListener(MouseEvent.MOUSE_OUT,函式);
實體名稱.addEventListener(MouseEvent.MOUSE_UP,函式);
實體名稱.addEventListener(MouseEvent.CLICK,函式);

function 函式(x){
    switch(x.type){
        case "mouseOver":
            程式內容
        break;
        case "mouseOut":
            程式內容
        break;
        case "mouseUp":
            程式內容
        break;
        case "click":
            程式內容
        break;
    }
}

Related Posts with Thumbnails

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

评论链接可以 移除 nofollow.