Shutting Down activities of loaded CHILD SWF , in main PARENT
Hi All
Scenario: in MAIN file, i have a door, when door is open, we can see activities behind the door - LOADED SWF - when the door is shut
i would like all the activities behind the door - LOADED SWF to stop
Problem: my first attempt was to REMOVECHILD when the door closed, however, still functions in child=loaded file are continuing
Possible Solutions i had in mind: I assumed if PARENT, dispatches an event and CHILD listens, i can say, if the door is closed, dispatch event
to the child to stop functions. but it doesnt work, because i assume i dont know how to listen for an event dispatched from parent
PARENT--------------
dispatchEvent(new Event("STOPALL"))
CHILD SWF-----------------
(what should i write here to target the parent of loaded swf??).addEventListener("STOPALL",stopallactivities)
function stopallactivities(e:Event)
{ the rest of story...}
2nd Solution . i read some previous discussions, some recommended LIstening for the DISPATCH EVENT in PARENT, and accessing functions
inside the CHILD through the parent, which i couldnt achieve using such codes:
PARENT-------
LoaderName.addEventListener("STOPALL", (i donno how to say, go to loaded content and run a function there)
Thank you . I am also open to any alternative solution that helps me shut off the activities when the door closes down, dispatching event was
the first thought that came to my mind, not necessarily the only answer i m looking for.