Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to transfer the NativeApplication instance to another NativeWindow
    primarykey
    data
    text
    <p>Not sure if my title accurately describes what I'm trying to do, but basically I've created a new NativeWindow as follows (using an example from the Adobe NativeWindow documentation <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/NativeWindow.html?filter_flex=4.1&amp;filter_flashplayer=10.1&amp;filter_air=2#minSize" rel="nofollow noreferrer">http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/NativeWindow.html?filter_flex=4.1&amp;filter_flashplayer=10.1&amp;filter_air=2#minSize</a>):</p> <pre><code>var windowOptions:NativeWindowInitOptions = new NativeWindowInitOptions(); windowOptions.systemChrome = NativeWindowSystemChrome.STANDARD; windowOptions.type = NativeWindowType.NORMAL; var newWindow:NativeWindow = new NativeWindow(windowOptions); newWindow.stage.scaleMode = StageScaleMode.NO_SCALE; newWindow.stage.align = StageAlign.TOP_LEFT; newWindow.bounds = new Rectangle(100, 100, 800, 800); newWindow.activate(); </code></pre> <p>However, now that I have my new window, I want to close the old window and make the new window the active NativeApplication, basically transferring all control over to the new one. Any idea how to do this? All help greatly appreciated.</p> <p>Edit:</p> <p>For anyone who is interested, and thanks to the answers provided, here's what I now do. Just create an mxml file using </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:Window xmlns:mx="http://www.adobe.com/2006/mxml" ... &gt; </code></pre> <p>Call this MyWindow.mxml or whatever, and then in the main controller create an instance of this using </p> <pre><code>private var myWindow:MyWindow = new MyWindow. </code></pre> <p>You can then set the height width minimizable and maximisable attributes accordingly, like myWindow.width = 400. To open the window you can then do either window.open(true) or window.visible = false; window.open(true) - the latter making the window invisible but available for use.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload