Hi - I'm currently building a very small basic app (built in
Flash) that is to be deployed online as well as with AIR. This is
the fist time I have used AIR. I was looking for a function that
will tell me if the application is running online as an SWF or as
an AIR application (for the few instances in which the code will
differ). This will enable me to keep the exact same code base and
just publish the file 2 ways.
One difference is that the Application class for each will be
different - flex uses Application class, while an Air uses
WindowsApplication. The app instance could be passed into the main
code and it's type checked e.g.
if (app is WindowedApplication)
else if (app is Application)
Actually, Air can use mx:Application if you want to use a
'chromless' app with a custom background/skin (no title bar, no
min/max/close buttons). I've done this and its the main mxml file
in the Air app.