Found the problem. You have to call the air.swf's launchApplication method from within a user-caused event handler. It MUST be in response to a mouse-click or keyboard event, and NOT one that was programmatically generated (e.g. you cannot call a function with something like "buttonClickHandler(new MouseEvent(MouseEvent.CLICK));" and expect it to work.)
So -- don't try to launch an external app unless you're doing it from within a function that was called by a user-generated event. A programmatically-generated event will fail every time, and will give you NO WARNING! (Nice little "undocumented feature" in air.swf...) L. On Sat, Oct 23, 2010 at 5:35 PM, Laurence MacNeill <[email protected]>wrote: > Oh, and of course allowBrowserInvocation is set to true... > > L. > > > On Sat, Oct 23, 2010 at 4:30 PM, Laurence MacNeill < > [email protected]> wrote: > >> I'm loading the air.swf properly (I know this because when I run the Flex >> program in Debug mode, there's a message on the console telling me that >> air.swf loaded properly...) >> >> When I call the air.launchApplication function, though, nothing happens... >> >> myAirSWF.launchApplication("myAirProgramID", "", [myArgs]); >> The above does nothing at all... No errors, no nothing... >> >> It's AIR 2.0, which uses no Program ID (hence the second parameter there >> being a "" instead of the program ID.) From what I've read, this SHOULD >> work. But it does nothing. I also read somewhere that perhaps putting " " >> (a space) in the Prog. ID will help -- but that also did nothing. >> >> So why is my AIR app not loading from my Flex program? It should be >> working... >> >> The only thing I can think of is that maybe there's an event being passed >> back that I'm not listening to, perhaps? But that's not in the >> documentation for this air.swf file... Or perhaps it's because it's a >> secure (https) Flex page calling an insecure AIR app? Any ideas? >> >> Thanks, >> Laurence MacNeill >> Mableton, Georgia, USA >> > >
