我試圖訪問影片剪輯位於一個按鈕,我指這段代碼:AS3:在按鈕Accesing影片剪輯
var buttonObject = this[weaponsPurchased[i]];
然後我設置「將mouseEnabled」假(即部分作品)
buttonObject.mouseEnabled = false;
然後我試圖設置此按鈕unvisible內的影片剪輯(並且不工作)
buttonObject["square"].visible = false;
我得到這個犯錯或:
ReferenceError: Error #1069: Property square not found on flash.display.SimpleButton and there is no default value. at (...)
我沒有在互聯網上找到任何幫助,所以請幫助我。我究竟做錯了什麼?
您是使用IDE在按鈕中製作MovieClip還是使用'addChild()'? – David
我是用IDE做的。 –
我認爲最好的行動方式是使用'addChild()'來避免併發症。 – David