When I try to access the uncaughtErrorEvents dispatcher when loaded directly, everything works well. But when I try the same code when loaded by another swf I get a reference error.
protected function onAddedToStage(e:Event):void {
trace("Flash version: " + Capabilities.version);
try {
loaderInfo.uncaughtErrorEvents.addEventListener("uncaughtError", onUncaughtError);
trace("YAY!");
} catch (e:Error) {
trace(e);
}
}
Output when loaded directly (in browser):
Flash version: MAC 10,1,53,64
YAY!
Output when loaded by another "loader" SWF:
Flash version: MAC 10,1,53,64
ReferenceError: Error #1069: Property uncaughtErrorEvents not found on flash.display.LoaderInfo and there is no default value.
If others can replicate this I'd be appreciative.
EDIT: Also have tried this with stage.loaderInfo
, instead of just loaderInfo
. Same issue...