[英]AS3: How will I find movieclips name of external swf which is loaded inside a movieclip.movieclip?
我已在另一个动画片段中的动画片段中加载了swf。
框架 。 pageLoader .addChild(intoMC)
这是代码:
frame.visible = true;
var bookImagePath: String = "file://" + File.userDirectory.nativePath.toString() + "/Books/" + someFoldername + "/Home.swf";
trace(bookImagePath);
var intoMC: Loader = new Loader;
intoMC.load(new URLRequest(bookImagePath));
frame.pageLoader.addChild(intoMC)
现在,这个Home.swf有一些带有随机名称的影片剪辑(例如:triger,boat,rain),我想将其制作为按钮。
在这里需要帮助...
我尝试过这样的事情。 这行得通。
var someMC: MovieClip
var intoMC: Loader = new Loader;
intoMC.contentLoaderInfo.addEventListener(Event.COMPLETE, PageLoad);
intoMC.load(new URLRequest(bookImagePath));
function PageLoad(e: Event): void {
someMC = e.target.content as MovieClip;;
displayFrame.pageLoader.addChild(intoMC)
}
还有其他办法吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.