0

toddling through AS3. I was wandering if someone could give me any pointers on how to make it so when a button is clicked, it prompts a balloon to appear so you can 'quit out' of flash. This is from fullscreen mode - post development.

I'm new to AS3 so any tips would be appreciated.

quitout_btn.addEventListener(MouseEvent.CLICK, quitout);

function quitout(event:MouseEvent):void
{
 something happens here.....
}

Thanks for your help.

user3082874
  • 61
  • 2
  • 11

2 Answers2

2

You could also be looking for fscommand("quit")

import flash.system.fscommand;

Then run

function quitout(event:MouseEvent):void
{
     fscommand("quit")
}
Bennett Keller
  • 1,724
  • 2
  • 11
  • 11
0

stage.displayState=StageDisplayState.NORMAL; to trigger fullscreen to windowed mode via code.

NativeApplication.nativeApplication.exit(); for exiting the application (if you're in an desktop AIR application)

Community
  • 1
  • 1
Jono
  • 3,949
  • 4
  • 28
  • 48