Skip to main content
GogetaX
Inspiring
Jul 14, 2018 9:16 PM UTC
Answered

Cant spot a but with AS3

hey everyone, not sure why the compiler says i have problem with this line, please help me to figure it out.

im trying to access a movieclip named SubMC at root point, i want to see what frame it is atm.

This topic is closed to new replies. Start a new post to keep the conversation going.
Flipline
FliplineCorrect answer
Inspiring
Jul 15, 2018 3:54 AM UTC

It looks like the problem here is that the root property is a DisplayObject, so it can't reference instances like subMC unless you cast root as a MovieClip. If you switched it to MovieClip(MovieClip(root).subMC).currentFrame it should work though.

1 reply

Flipline
FliplineCorrect answer
Inspiring
Jul 15, 2018 3:54 AM UTC

It looks like the problem here is that the root property is a DisplayObject, so it can't reference instances like subMC unless you cast root as a MovieClip. If you switched it to MovieClip(MovieClip(root).subMC).currentFrame it should work though.

Translate