import flash.external.ExternalInterface;
ExternalInterface.addCallback("SetWeight", null, SetWeight);
//-------------------------------------------
ExternalInterface.call("OnStartWeight","");
WeightPanel.labelWeight.text = "0";
//_global.CurPos = Number(0);
trace(_global.CurPos);
stop();
function SetWeight(weigth:String) {
WeightPanel.labelWeight.text = weigth;
//_global.CurPos = 190 + Number(WeightPanel.labelWeight.text);
}
注意:不同的剪辑之间不能访问共享变量
一般是 主时间轴设接受C#调用,获得参数,然后赋值给全局变量 _global.xxx,
然后在进入剪辑A(movieA)的第一帧,设置 movieA._global.xxx = _global.xxx
这样就可以在剪辑A中使用 _global.xxx了