This content has been marked as final. Show 3 replies
there must be some code on your main timeline that instantiates some class (in which case you can pass a reference to the main timeline) or you use the document class which references the main timeline.
I worked with the problem last night and the solution I started coming to involved creating my own custom document class based off which extends MovieClip. My thought is that way I have access to the initialization routine of the timeline itself and that all of the elements on the main timeline should be "properties" of my custom class.
Is this correct? Is there a down side to doing this & if so what is it & why?
Also, just for my reference, the last time I did anything with ActionScript I think I was using '_root' to target the main timeline. WHat are the global variable names in AS 3? Is it just 'root' & 'stage' or 'Root' & 'Stage' or what?
i do something similar (sometimes) using the class below when i need access to the main timeline from a variety of classes and there are many classes that don't need that reference.
use root and stage to reference those objects.