Denoteone
Denoteone

Reputation: 4055

addChild tells root.gotoAndStop();

How do you tell the root timeline to root.gotoAndStop(2); from the timeline of a movieClip added using addChild?

In the maintime line I have

addChild(fade_eng);

and in fade_eng I have the following on frame 20

root.gotoAndStop(2);
this.gotoAndStop(1);

But I am getting 1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:Stage.

Upvotes: 1

Views: 640

Answers (1)

Marty
Marty

Reputation: 39456

Typecast root to MovieClip.

MovieClip(root).gotoAndStop(1);

This thread should thoroughly explain the process and how it works.

Upvotes: 3

Related Questions