2 Replies Latest reply on Nov 8, 2012 1:35 PM by pierBover

    Do unused libraries get compiled into the binary file?

    pierBover Level 1

      So if I import all classes inside flash.display.* and only use Sprite, will everything get compiled?

       

      Or only Sprite?

        • 1. Re: Do unused libraries get compiled into the binary file?
          adobe_paul Adobe Employee

          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.

           

          However...

           

          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.

           

          However...

           

          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.)

           

          Paul

          • 2. Re: Do unused libraries get compiled into the binary file?
            pierBover Level 1

            Thanks a lot Paul. That makes it very clear.