0
A
回答
1
如果所有的MC是在同一容器中,即另一個影片剪輯/雪碧,你可以更新的「單擊mc」子索引或只是將它添加到容器再次。
這將是您的單擊處理程序:
function clickHandler(e:MouseEvent):void {
//addChild puts the target clip on the top of the display list
e.target.parent.addChild(e.target);
}
這將是清潔其實例名稱引用容器(如container.addChild())而不是使用e.target.parent。如果您使用「e.target」,請確保MC中的'mouseChildren'屬性爲'false'。
如果你喜歡設置單擊mc的子指標,你會做這樣的事情:
function clickHandler(e:MouseEvent):void {
// setting the child index to 0 puts the MC at the top of the list
container.setChildIndex(e.target, 0);
}
同樣,你用「e.target」確保「mouseChildren」任何時候都是虛假的或否則,鼠標焦點實際上可以點擊你的「點擊mc」內的顯示對象。
相關問題
- 1. 訪問影片剪輯中的影片剪輯 - actionscript 3
- 2. Actionscript 3比較兩個影片剪輯
- 3. 要使用ActionScript中的數據使用actionscript 3來操縱電影剪輯
- 4. 將電影剪輯轉換爲另一個電影剪輯
- 5. Actionscript 3 mouse_over播放電影
- 6. 解析兒童的影片剪輯?
- 7. 的ActionScript影片剪輯褪色
- 8. 訪問兒童影片剪輯的FlashDevelop
- 9. Actionscript 3帶有浮點數的影片剪輯大小
- 10. Actionscript 3 - 查找影片剪輯邊緣的座標
- 11. 按鈕和電影剪輯actionscript 2.0閃光燈
- 12. ActionScript 3.0將邊框添加到電影剪輯
- 13. 自動電影剪輯錄制
- 14. 電影片段陣列ActionScript 3
- 15. Actionscript 3 mouse_over播放電影,mouse_out反向電影
- 16. 動作腳本3 - 多個電影按鈕剪輯?
- 17. AS 3父子電影剪輯中的調用函數
- 18. Pyqt GroupBox育兒
- 19. 電影剪輯中的AS3按鈕
- 20. AS3動態小精靈/電影剪輯
- 21. 按鈕內的電影剪輯
- 22. AS3通電影剪輯,超級
- 23. 的Flash,ActionScript 3的:獲得被包含在一個影片剪輯
- 24. AS3如何在ActionScript中創建的滾動條爲影片剪輯3
- 25. 如何使用ActionScript 3與影片剪輯按鈕檢查輸入文字?
- 26. 在Flash影片剪輯使用ActionScript更改圖層的順序?
- 27. actionscript for循環迭代器更改影片剪輯名稱
- 28. 訪問影片剪輯在影片剪輯
- 29. 與影片剪輯
- 30. 影片剪輯AS3
查看你最近的7個問題,我覺得我有足夠的信息來構建你正在嘗試製作的應用程序並將其提供給你...你自己嘗試過什麼代碼來完成這個任務? –
:))我想創建一個益智遊戲,只是爲了提高我在AS3的知識,因爲我在4周前開始學習AS3。 我必須做出養育孩子和遊戲的解決方案,就像所有的拼圖都按正確的順序排列,而不是顯示洞圖。 你能幫助我嗎? 謝謝 – CMS