在a.swf中
stop();
varloaded_a=50;
varconn_a=newLocalConnection();
conn_a.trace_b=function(param){
show_a.text="b加载="+param+"%";
};
conn_a.connect("loadB");
this.onEnterFrame=function(){
loaded_a+=1
conn_a.send("loadA","trace_a",loaded_a);
if(loaded_a>=100){
deletethis.onEnterFrame;
}
};
b.swf中
stop();
varloaded_b=20
varconn_b=newLocalConnection();
conn_b.trace_a=function(param){
show_b.text="a加载="+param+"%";
};
conn_b.connect("loadA");
this.onEnterFrame=function(){
loaded_b+=1
conn_b.send("loadB","trace_b",loaded_b);
if(loaded_b>=100){
deletethis.onEnterFrame;
}
};