[问题]MovieClip(root)与root as MovieClip

楼主: heavenbetula (绿草)   2014-07-30 20:53:39
请问MovieClip(root)与root as MovieClip差异性在哪呢?
今天我作了一个a_mc与b_mc
a_mc中有一个按钮按下去后,b_mc就不会动了
而我在a_mc里面按钮按下去的程式中输入
MovieClip(root).b_mc.stop();
b_mc会停止动作
但是我输入
root as MovieClip.b_mc.stop();
就会跑出
"1119:存取未定义的属性b_mc(透过静态类型Class的参考)。"
MovieClip(root)与root as MovieClip两者不相等吗?
作者: fixxxxx (修)   2014-07-31 17:30:00
(root as MovieClip)
楼主: heavenbetula (绿草)   2014-07-31 20:09:00
感谢!原来如此...竟然没注意到这错误= ="

Links booklink

Contact Us: admin [ a t ] ucptt.com