【问题标题】:What kind of trouble if using _global in swf for presenter如果在 swf 中为 Presenter 使用 _global 会有什么麻烦
【发布时间】:2013-02-07 17:56:23
【问题描述】:

我必须转换很多 swf 才能在 Presenter 中使用它们。 它们是旧的 (AS1),并且到处都有很多“_root”(“_root”在 Presener 中不起作用)。

所以我的想法是像这样设置一个全局变量:

_global.myUniqueVariable = this;//on the first image of the scene, this = _level0 or _root

并将 _root 替换为 _global.myUniqueVariable。

但在 Presenter 7 的文档中(我正在研究 8),Adobe 警告不要使用 _root、_level#、stage 和 _global。但我试过了,它奏效了。

那么,如果我使用它会出现什么样的问题。我能想象的唯一麻烦是覆盖 Presenter 的一个变量(但它不会附加一个非常具体的名称)。

谢谢, 格雷格

【问题讨论】:

    标签: flash global presenter


    【解决方案1】:

    如果你用 loadMovie 命令将 swf1 加载到另一个 swf2 中,并且为不同的播放器版本编译 swf1 和 swf2,就会有不同的 _globals。并且调试器可能不会显示这个事实。

    如果你将一些 swf 加载到不同的关卡或电影中,并且该 swf 与“单个数据交换点 _global”坐标,它可能不起作用...

    【讨论】:

      猜你喜欢
      • 2020-12-19
      • 1970-01-01
      • 1970-01-01
      • 2017-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多