Re: [問題]AS3 改變游標

看板Flash作者 (CJ Cat)時間17年前 (2008/08/04 21:36), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串2/2 (看更多)
※ 引述《hoHORNrn (HORN)》之銘言: : 如果現在我要用AS3來做的話 : 不知道startDrag那個要怎麼改才能讓他順利的執行呢? 我都是這樣做 Mouse.hide(); //隱藏滑鼠 cursor_mc.mouseEnabled = false; //關掉滑鼠觸發事件 cursor_mc.mouseChildren = false; //關掉children的滑鼠觸發事件 stage.addEventListener(MouseEvent.MOUSE_MOVE, moveCursor); function moveCursor(e:MouseEvent):void { cursor_mc.x = cursor_mc.parent.mouseX; cursor_mc.y = cursor_mc.parent.mouseY; e.updateAfterEvent(); //不理會frame rate,以最高速率更新位置 } 這樣的寫法應該是跑起來最順暢的 startDarg()有frame rate的限制 而updateAfterEvent()則沒有 -- CJ Cat = Croa'J Cat = Cockroach Cat = 西街凱特 = 蜚蠊貓 = 蟑螂貓 Blog http://cjcat.blogspot.com Gallery http://cjcat2266.deviantart.com ptt2 Board CJWorkshop - 阿多比閃光(Adobe Flash)研討區 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.202.223.3

08/04 22:30, , 1F
謝謝你~~我終於會了^^
08/04 22:30, 1F

08/05 11:56, , 2F
推好效能!
08/05 11:56, 2F
文章代碼(AID): #18bmNcjF (Flash)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
文章代碼(AID): #18bmNcjF (Flash)