创建被访问的swf文件

首先创建一个fla文件,名字叫movie.fla,在该文件库中放一个mc,

并将其拖放到舞台上,然后

命名为test_mc,

然后在库中给该mc绑定一个类,类名随意。

创建访问swf文件的swf文件

再创建一个fla文件,在第一帧写下如下代码:

var imageRequest:URLRequest=new URLRequest("movie.swf"); var imageLoader.Loader=new Loader(); imageLoader.load(imageRequest); addChild(imageLoader);

imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete); function onComplete(evt:Event):void { evt.target.content.test_mc.y=100; //改变test_mc,的y坐标 }  

原文地址:https://www.cnblogs.com/regalys168/p/3599158.html