Skip to main content
Inspiring
September 28, 2019
Question

Publishing Air Application - interactivity doesn't work (flash does work)

  • September 28, 2019
  • 1 reply
  • 475 views

I've created a simple actionscript animation with several MC's - each with nested MC's that perform their own functions.  Each frame/MC has a hotkey assigned to it in order to navigate to it and jump around the animation.  When I publish as a flash projector the app works perfectly.  BUT when I publish as an AIR app, I'm stuck on the first frame and non of my keyboard commands work.  Is there something I'm missing?  Is the AC3 script for AIR somehow different in terms of keyboard Event Listeners, etc.?

 

Thanks in advance for any help you can lend!

 

Best,

 

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    September 28, 2019

    no, the as3 is the same.  you may need to click something on stage before keyboard presses will be detected, but i think air works the same as a projector and that's not necessary.  try it, though.

    Inspiring
    September 29, 2019

    KGlad thanks for jumping in... so I tried to clicking on the app after launch and still the same result.

     

    I do have a line of script in the first frame 'stage.DisplayState = stageDisplayState.FULL_SCREEN;'.

     

    The app does launch full screen as directed ... no control... If I click ESC the app kicks out of Fullscreen mode and I can control it.  I tried commenting out this line and republishing... now the app launhes in a window and works correctly.  I do want the app to run full screen though. 

     

    Can anyone suggest a work around?  Note: in flash apps, using stage.DisplayState = stageDisplayState.FULL_SCREEN; in the first line has always worked perfectly.  Not sure why it's an issue with AIR?

    Colin Holgate
    Inspiring
    September 29, 2019

    You may have typed that line in here, rather than copy and paste, DisplayState should be displayState, and stageDisplayState should be StageDisplayState.

     

    In any case, the line should be this:

     

    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;