This is possible in an HTML AIR application where your swf is
emdedded in the main application HTML file via the <object>
tag. I have tried out both FSCommand & ExternalInterface and
function has to be present in the HTML file for FSCommand to work.
I don't think there is a way to do it in a flex AIR