Handy AS3 One-liners

Thought I’d make a post that I will constantly update with handy AS3 one-liners (or 2) as I think of or find them.

Stopping all sounds – ever have the problem/bug of sounds continuing to play? Like from a video?

SoundMixer.stopAll();

Smooth images after they are loaded? in Event.COMPLETE handler add:

var bitmap:Bitmap = e.target.loader.content as Bitmap;
bitmap.smoothing = true;

AIR – When in fullscreen allow keyboard use:

stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;


  1. No comments yet.

  1. No trackbacks yet.