Saariko
Saariko

Reputation: 512

as3-flash: any way to access all the instances placed in different frames from document class?

I have programmed a game using the Flash authoring tool and a document class.
I'm trying to graphically add instances and add functionality in the document class.

Suppose I have a main timeline with 3 frames, each frame reperesents a different level of the game.
In frame 1 I have an instance of the MovieClip class named tree1 on the stage, and in frame 3 I have an instance of the MovieClip class named tree3 on the stage.

In my document class, after an initial stop() command, I want some logic like:

tree3.scaleX = tree1.scaleX;

But tree3 is unknown to the runtime since we are not of frame 3 yet.

Any way to access all the instances on all frames declared in the authoring tool from the document class? Thanks in advance.

Upvotes: 2

Views: 363

Answers (1)

shanethehat
shanethehat

Reputation: 15560

In a word, no. As you have said in your question, until the playhead reaches frame three the assets there do not exist.

Upvotes: 1

Related Questions