Something Wrong with the System

A Flash/Actionscript blog

AIR Mac & PC listeners

Hey, just putting the word out in case anyone else is having similar problems.

I was playing with AIR AS3/Flash recently and ran into some serious headaches while listening for the closing event.

Eventually I discovered that Mac and PC have to listen for two different events… sigh. Or so I believe, I don’t have a Mac to test on.

PC Listener:

stage.nativeWindow.addEventListener(Event.CLOSING, onClosing);

Mac Listener:


NativeApplication.nativeApplication.addEventListener(Event.CLOSING, onClosing);

I’m new to AIR so if I’ve seriously misunderstood something fundamental please email me at:

organa@gmail.com

August 25th, 2008 by Peter Organa
Posted in Programming | Comments Off