1 Reply Latest reply on Nov 5, 2012 12:53 AM by Operandom

    Access files included in swc? (not classes)

    Operandom

      Hi!

       

      I saw it was possible to include files in a swc (for example, images, videos, etc) but I didn't find how access them from an other project.

       

      For example I have this folder tree :

       

      src

        - assets

          - images

              test.jpg

          - videos

              test.mp4

        test.mxml

       

      with test.mxml:

      <?xml version="1.0" encoding="utf-8"?>
      <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx">
          <s:Image x="0" y="0" width="100%" height="50%" source="assets/images/test.jpg"/>
          <s:VideoDisplay x="0" bottom="0" width="100%" height="50%" source="assets/videos/test.mp4"/>
      </s:Group>
      

       

      When I unzip the swc, the files are inside but when I add my Air library in my Air project’s library path, the included files in the swc are not extracted in the bin-debug, so the test.mxml doesn't find them.

       

      Did I miss something?

       

      And if not, I don't really understand why we have the possibility to include files in SWC if we can't use them in other projects... : /

       

      Thx!