Hey guys!
Right now I have a library that does something like this:
public class Main extends Sprite{
public function Main():void {
MyLibrary.init(this);
// the rest of your code goes here
}
}
I need the user to do that since I need a reference to the current DisplayObject since I need to access loaderInfo.sharedEvents
Is it possible to get a reference to the displayobject or to the loaderInfo of the movie currently being played (maybe it’s a static var of some class?)?
I was thinking on something like. flash.system.ApplicationDomain.currentDomain is there something like… flash.display.DisplayObject._root?
In AS2 this would be trivial but I’m afraid this may not be possible in AS3 :(… and I really need to get rid of that “init” call.
Any ideas?