I am using a HTMLloader class in my application and would like to close the window programmatically when certain events occur. Is there a way to this?
private var hLoader:HTMLLoader;
var rect:Rectangle = new Rectangle(50,50, 780, 500);
hLoader = HTMLLoader.createRootWindow(true,null,true,rect);
That’s how to get a reference to the window to which the hLoader belongs. Now, we can do things like listen for a mouseEvent and close the window. Example: