看板 Flash 關於我們 聯絡資訊
我想做有關小畫家油漆桶功能 然後再配合undo功能 可以填滿色後再回復 可是我填色兩次回覆第一次可以 第二次就有問題 請問可以幫我看一下問題出在哪嗎?謝謝 以下是我的程式碼 //填色 var fill_mc:MovieClip; var Depth = post_mc.getNextHighestDepth(); fill_listener.onMouseDown = function() { fill_mc = post_mc.createEmptyMovieClip("fill_mc" + Depth, Depth); var fillBD:BitmapData = new BitmapData(post_mc._width, post_mc._height, true, 0x00000000); //post_mc是load照片的mc fillBD.draw(post_mc, new Matrix()); fill_mc.attachBitmap(fillBD, Depth); fillBD.floodFill(fill_mc._xmouse, fill_mc._ymouse, colorStr); postArr.push(fill_mc); //這是push到array裡 紀錄回覆的mc } //回覆 undo_btn.onRelease = function() { //postArr 也還有紀錄別的畫線或是畫筆的mc MovieClip(postArr.pop()).removeMovieClip(); } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.228.187.111