我試圖讓這對年齡工作,但似乎沒有工作得非常好 這是我的代碼:的ActionScript 3.0的currentLabel不工作的加載.swf文件
import flash.display.MovieClip;
import flash.events.Event;
import flash.display.Loader;
import flash.net.URLRequest;
var cola:Loader;
cola = new Loader()
cola.load(new URLRequest("resources/colabar.swf"));
this.addChild(cola);
//cola.currentLabel = "frame1";
這工作。 .swf現在在我的舞臺上。逐幀移動。
明顯的是,當刪除/ /它不工作。並得到這個錯誤消息:1119:訪問可能未定義的屬性currentLabel通過引用與靜態類型flash.display:Loader。
你有沒有嘗試將你的加載器類型轉換爲MovieClip?否則,你將無法使用MC方法。 – m90 2012-03-18 18:52:53
我已經添加了這個:\t var MC:MovieClip \t MC.addChild(可樂)和我得到相同的錯誤。再次移除//使我在舞臺上沒有.SWF。 – PlayerX 2012-03-18 19:12:10
我正在考慮做'MovieClip(可樂).currentLabel =「frame1」;' – m90 2012-03-18 19:17:10