0
votes

I am trying to convert all my code that is in the timeline in the Movement.fla file into code for an external file name Main.as for Flash CS6 AS3. I have no idea how to reference the objects on the stage or the symbols in the library of Movement.fla from Main.as.

Can someone show me how to reference objects and symbols through an external file? The inclusion of some pseudo code would also be preferable.

1
If you make Main.as your document class, everything is almost exactly the same.Marty

1 Answers

0
votes

Display objects on stage can be referenced by giving them an instance name on object's properties. Once an object has instance name your calls can be like this.

instanceName.play();
stage.addChild(instanceName); // and soo on...

Also some objects might only exist at some point in the timeline, if your previous code was at the same point in the timeline then this could be the reason why is not working as external. Make sure your objects always exist and not only in some frames.