This content has been marked as final. Show 4 replies
create parent movieclips of MC1 and MC2 and assign handler to the parents. load your swfs into theParent1.MC1 and theParent2.MC2.
you can assign handlers to theParent1 and theParent2 whenever you want and those handlers can define actions for their children.
That is basically what I am doing, except that MC1 and MC2 *are* the parent clips of a movie called content_mc inside each of them. My problem is that the movie getting loaded into MC1.content_mc has to refer to a component in the SWF that is getting loaded into MC2.content_mc and vice-versa.
I need the MC1.setup function and the MC2.setup functions to run ONLY when both MC1.content_mc and MC2.content_mc are *both* loaded.
Either that or I need to be able to create an event handler for a component that has not yet been loaded. Is there a way to refer to a component in a movie before you are sure that it has been loaded?
then define a loop in MC1 or MC2 that checks whether loading is complete both MC1.content_path and MC2.content_path, and when it is, terminate the loop and call your setup functions.
I was afraid it was something like that. intervals make me a bit nervous because i don't fully understand what scope they exist in and they keep running until you kill them.
I was sort of imagining some kind of signaling process whereby each would try to run their setupFN and if conditions were not right, would set a flag somewhere so that when the other setupFN ran, it would know to do some extra work to finish setup for the other movie clip. that became confusing too so I bit the bullet and did an interval thing. It seems to be working. If anyone sees potential problems, i'd love to hear about it.