I have 2 AIR applications ( A and B ) that can communicate through a LocalConnection object. I checked that messages are certainly sent / received appropriately.
I want to have A tell B to go to the fore. Both applications have a full screen:
stage.fullScreenSourceRect = new Rectangle(0, 0, 1080, 1920); stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
I tried several permutations, but so far nothing is working.
private function initSlave(channel: String): void { conn = new LocalConnection(); conn.client = { 'activateSlave': activateSlave }; conn.allowDomain("*"); conn.connect("_" + channel); } private function activateSlave(): void { stage.nativeWindow.orderToFront();
If I leave both applications in windowed mode ( stage.displayState = StageDisplayState.NORMAL ), the alwaysInFront switch actually works. A call to activate() or orderToFront() still does nothing. If I try to switch alwaysInFront and then install the application in full screen mode, the application ends in full screen mode beyond my application window. Perhaps there is an event that I should wait before installing the application in full screen mode?
I found a thread that mentions that orderToFront() only works on windows in one application, which explains why it doesn't do anything.
Does anyone have any ideas for removing this? Maybe there is a way to add B to application A so that they are actually the same application? I'm not sure how to do this with an AIR application as simple as loading SWF due to the need for external resources.
source share