[英]Adobe AIR, how to open a scene in a new window
I'm developing a networked AIR application in Flash Professional. 我正在Flash Professional中开发一个联网的AIR应用程序。 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.
我需要打开该应用程序的两个实例,搜索后发现多次启动该应用程序只会导致将invoke事件发送到当前正在运行的应用程序。
Up until now I've been using NetConnection & NetGroup (Supported by Flash Player 10.1+), now that I'm using ServerSocket & Socket, it requires the AIR 2+ runtime. 到目前为止,我一直在使用NetConnection&NetGroup(受Flash Player 10.1+支持),现在我正在使用ServerSocket和Socket,它需要AIR 2+运行时。
I found a solution to open a window on invoke. 我找到了一种在调用时打开窗口的解决方案。
my solution would be to launch a new window on invoke 我的解决方案是在调用时启动一个新窗口
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!";
}
and have it 并拥有它
gotoAndPlay(1, "Scene 1");
Is there a way to execute that on the new window? 有没有办法在新窗口中执行该操作? Or is there a way to open two instances of an AIR app?
还是有办法打开AIR应用程序的两个实例?
Edit You can open two instances of the same air app by changing it's ID. 编辑您可以通过更改ID来打开同一air应用程序的两个实例。 However, this is a very involved process every time I want to debug!
但是,每次我要调试时,这都是一个非常复杂的过程!
Turns out AIR on Android doesn't support ServerSockets. 事实证明,Android上的AIR不支持ServerSockets。 This means I must use non-AIR flash methods to achieve communication.
这意味着我必须使用非AIR闪存方法来实现通信。
I can then achieve network testing through multiple Flash Player instances. 然后,我可以通过多个Flash Player实例实现网络测试。
I don't believe ADL has the ability to run more than instance at a time. 我不认为ADL能够一次运行多个实例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.