【发布时间】:2014-02-27 14:38:36
【问题描述】:
我有一个名为“测试”的变量(字符串)帧 1 场景 1。我还有一个名为“pointerMC”的影片剪辑。在pointerMC 中,我有另一个名为handMC 的影片剪辑。在 handMC 内部,我想像这样调度一个事件:
root.dispatchEvent(new Event("eventName"));
除了我希望“eventName”成为包含字符串的“测试”变量,所以是这样的:
root.dispatchEvent(new Event(root.test));
但是当我这样做时,它给出了一个错误提示:
Symbol 'handMC', Layer 'actions', Frame 20, Line 2 1119: Access of possibly undefined property test through a reference with static type flash.display:DisplayObject.
为什么会出现这个错误?
【问题讨论】:
标签: actionscript-3 flash root event-listener dispatchevent