This content has been marked as final. Show 6 replies
you can reference the main timeline from any display object (probably your loaded swf's parent loader) by using the display object's root property. to reference a function on the main timeline, cast that root property as a movieclip and use dot notation just like as2.
I`ve already tryed just that, but my application is a little bit more complicated than I mentioned above and when I got errors I thought it wasn`t the way to go. Now at least I know where to start from.
Ok, so I`ve actually made some progress! I`m getting new errors.
The error says: "TypeError: Error #1006: initPasswordInput is not a function.
at intro6_fla::KnockArtLogoAnimation6_7/onRollOver2()", where initPasswordInput() is the function on the loader .swf
What`s that supposed to mean? I`ve defenetly defined the function.
PS: I`m using a document class for the loader swf, but I`ve tryed a simpler example and it tells me the same thing...
your code in the external swf must be on some movieclip's timeline. and that movieclip must be in the display list (ie, on-stage) for its code to execute.
so, from any timeline in your external swf, you can use this.root to get to the external swf's main timeline. then the parent of that external swf main timeline will be your loader (in the loading swf). and the root property of that loader will be the loading swf's main timeline. so, you can always use:
Thanks a milion, kglad!