在AS3中更改动画片段内的变量值

时间:2021-03-02 20:17:27

Is it possible? If so, how?

可能吗?如果是这样,怎么样?

Let's say I have a movieclip in the main timeline named mc_1 and inside this movieclip I have another movieclip named mc_2 that has a variable called numberExample.

假设我在名为mc_1的主时间轴中有一个movieclip,在这个movieclip中我有另一个名为mc_2的movieclip,它有一个名为numberExample的变量。

What I am trying to do is change numberExample values from the main timeline itself.

我想要做的是从主时间轴本身更改numberExample值。

1 个解决方案

#1


Trace

 trace(mc_1.mc_2.numberExample);

or change it like this:

或者改变它:

mc_1.mc_2.numberExample=3;

#1


Trace

 trace(mc_1.mc_2.numberExample);

or change it like this:

或者改变它:

mc_1.mc_2.numberExample=3;