flash swf文件进行传值教程,下面是实例源码哦,看看对你肯定有用.
//创建一个文本用于显示变量
this.createTextField("display",1,100,150,300,20);
display.border = true;
//创建一个MC用来装载b.swf
this.createEmptyMovieClip("b_mc",this.getNextHighestDepth());
//MovieClioLoader方法加载b.swf
var mclListener:Object = new Object();
//加载成功时调用n变量
mclListener.onLoadInit = function(target_mc:MovieClip) {
display.text = target_mc.n;
};
var b_mcl:MovieClipLoader = new MovieClipLoader();
b_mcl.addListener(mclListener);
b_mcl.loadClip("b.swf",b_mc);
下面是取得值代码.
var n:String="这是b.swf中的变量n"
简单吧.
时间: 2024-10-24 22:37:44