Christian Henschel
Software Engineer
© 2023 All rights reserved.
Calling parent-functions of a loaded SWF
If you’re loading an external SWF-file into your Main-SWF (or any other swf), the external SWF cannot call any self-made function you defined in your main by simply write: this.parent.functionName().
The compiler throws an error, saying that it can’t find a method with that name in flash.display:DisplayObjectContainer.
But you can avoid this by typecasting the parent as an Object like this:
var fooObject:Object = this.parent as Object;
Now you can call methods from the parent-class: fooObject.functionName();