ok I have a subclass of TitleWindow
with this method:
public function launchInNewWindow(e:Event):void
{
this.parent.removeChild(this);
ownWindow = new Window();
ownWindow.systemChrome = 'none';
ownWindow.type = NativeWindowType.LIGHTWEIGHT;
ownWindow.transparent = true;
ownWindow.setStyle('showFlexChrome', false);
ownWindow.width = this.width > 750 ? 750 : this.width;
ownWindow.height = this.height > 550 ? 550 : this.height;
edit.enabled = false;
ownWindow.addChild(this);
ownWindow.width += 5; //add to show dropshadow
ownWindow.height += 10; //add to show dropshadow
ownWindow.open();
_inOwnWindow = true;
ownWindow.nativeWindow.x = Application.application.nativeWindow.x + this.x + 5; //keep in same spot add 5 for systemChrom border
ownWindow.nativeWindow.y = Application.application.nativeWindow.y + this.y + 30;//keep in same spot add 30 for systemChrom title
}
What this does is make the title window its own Window
(NativeWindow) by creating a new Window object and adding itself to the new Window's displayList.
It works really well, however if I have a removedEffect
set on the instance of this class it produces an error when trying to add itself to the Window's displayList.
I tried adding:
this.setStyle('removedEffect',null);
and
this.setStyle('removedEffect',new TitleWindow().getStyle('removedEffect'));
to the method as an attempt to remove any removedEffect set on itself before hand, but with no luck.
but it works fine if there is no removedEffect on the component. There has got to be a way to fix this.
Any ideas?
Thanks!!