Flash JavaScript API - only make JS callback async if currently inside a JavaScript event loop (so that events fire in order)