title: Adobe AIR, how to open a scene in a new window
body: <p>I'm developing a networked AIR application in Flash Professional.  I need to open two instances of the application and after searching I found that launching the app multiple times just causes an invoke event to be sent to the currently running app.</p>
  
  <p>Up until now I've been using NetConnection &amp; NetGroup (Supported by Flash Player 10.1+), now that I'm using ServerSocket &amp; Socket, it requires the AIR 2+ runtime.</p>
  
  <p><a href="http://www.actionscript.org/forums/showthread.php3?t=254267" rel="nofollow">I found a solution to open a window on invoke.</a></p>
  
  <p>my solution would be to launch a new window on invoke</p>
  
  <pre><code>function openWindow():void
  {
  newWin = new NativeWindow(init); //Initialize the Native Window
  newWin.activate();
  newWin.height = 200;
  newWin.width = 300;
  newWin.title = "My First New Win!";
  }
  </code></pre>
  
  <p>and have it</p>
  
  <pre><code>gotoAndPlay(1, "Scene 1");
  </code></pre>
  
  <p>Is there a way to execute that on the new window? Or is there a way to open two instances of an AIR app?</p>
  
  <p><em>Edit</em>
  You can open two instances of the same air app by changing it's ID.  However, this is a very involved process every time I want to debug!</p>