0

I am developing an Adobe AIR application which uses both native windows and floating panels. Is is possible to enable the creation of a floating window instead of a native window when a JavaScript window.open() function is called?

It is required that all of the floating windows are contained within one native window, therefore the creation of more native windows is not suitable.

I have used a Custom HTMLHost class in order to enable the creation of a native window but I can’t work out a way of creating a MDI window instead. I am using the flexMDI framework for my floating panel interface.

Any help on this would be much appreciated.

Oliver
  • 1

1 Answers1

0

You can try hijacking the HTML's window object via code:

htmlContent.addEventListener(Event.COMPLETE, htmlLoaded);

private function myOpenFunction(...args) {

    // Do stuff with args
}

private function htmlLoaded(event:Event):void
{
    htmlContent.domWindow.open = myOpenFunction;
}

I'm not sure if that (or something very similar) will work, but it's probably the only way to do it if it can be done at all.

Sophistifunk
  • 4,742
  • 4
  • 28
  • 37
  • Unfortunately this solution doesn't work! :( I need to be able to listen for javascript functions. But I can't find a way. – Oliver Jul 29 '10 at 13:50