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了

相关文章:

  • 2021-08-30
  • 2021-08-21
  • 2021-11-22
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-13
  • 2021-08-16
  • 2022-01-30
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
相关资源
相似解决方案