I have this code that works from an .as file
if (loaderInfo.loader)
loaderInfo.loader.dispatchEvent(new Event("pageFinish", true));
Then I put the above code into an .fla file (another existing Flash file), but (loaderInfo.loader) always returns false, eventhough it is loaded from another swf. Hence the event is never dispatched.
Edit: I'll try explaining it a bit more.
This works:
container.swf --(loads)--> page1.swf (page1.fla + page1.as)
page1.swf does send the event to container.swf
This does not work:
container.swf --(loads)--> page2.swf (page2.fla)
page2.swf does send the event because loaderInfo.loader returns false here
There is no changes to container.swf between both cases, only changed an xml file to point to either page1.swf or page2.swf