1 Reply Latest reply on Jul 24, 2009 5:34 AM by JeffryHouser

    check inside app if a .swc has been loaded




      i have a class inside my app which needs to do two different things based on whether an external .swc file has been loaded. the .swc file has a library which i want to use only if it is present (loaded into the app). otherwise, i want to do something else.


      is there a nice way to check whether a library in the .swc is available (essentially, if the swc has been loaded) during runtime?



        • 1. Re: check inside app if a .swc has been loaded
          JeffryHouser Level 4

          I am confusd by your question.


          The Flex compiler optimizes an application--AKA swf--to remove all unused classes.


          If an instance of the class is instantiated in a Flex application, then that class goes into the final swf.  Even if that class is located in a swc library.


          You wouldn't be loading swcs individually in a Flex application.  As far as I know, there is no way to load swcs during runtime.