So if I import all classes inside flash.display.* and only use Sprite, will everything get compiled?
Or only Sprite?
In general, only the classes you actually use are compiled in -- the import statement just tells the compiler where to look to try to find code to compile.
Since flash.display.* are all native classes, none of them are ever included in your .air file (desktop) or .apk file (Android) or .swf file (Flash Player), because the flash.display.* classes are built into the AIR/Flash Player runtime and their definitions exist there.
If you build an AIR for iOS app, the runtime has to be compiled in as part of your app. Currently the entire runtime is compiled into your app, regardless of whether you use certain parts of it or not. (The same is true if you use a captive runtime for your desktop or Android AIR app.)
Thanks a lot Paul. That makes it very clear.