I am creating a Flash training app that includes a glossary. You click a button and the glossary opens. The glossary loads thus:
var request:URLRequest = new URLRequest("glossary.swf");
var loader:Loader = new Loader()
loader.load(request);
swfCont.addChild(loader);
The glossary has a scrollbar, and that scrollbar has this listener (among other things):
scrollbar.addEventListener(MouseEvent.MOUSE_UP, stopScroll);
Once the glossary is loaded into my app, if I do a MOUSE_DOWN on the scrollbar and then drag the mouse away from the glossary, onto the parent stage, then when I do a MOUSE_UP on the parent stage, I need to dispatch a new MouseEvent.MOUSE_UP event to the scrollbar in the glossary swf.
How do I access the scrollbar of glossary.swf in my dispatchEvent? In other words, in the following code in the parent:
stage.addEventListener(MouseEvent.MOUSE_UP, glossarySBMouseUp);
function glossarySBMouseUp(me:MouseEvent):void {
xxx.dispatchEvent (new MouseEvent(MouseEvent.MOUSE_UP));
}
…what’s xxx?