0 Replies Latest reply on Aug 10, 2006 10:05 PM by isml

    Question about embedding assets that are in Swc file

    isml
      The assets i refer to here are mainly gifs. I compiled them to a single swc file , named utility.swc
      Directory structure
      Utility
      -----Assets
      --- Logo1.gif
      ----Logo2.gif
      ----Common
      ---- xxx.as
      --- yyy.mxml

      It is a swc file that contains some useful class and gifs. And I have known from the Docs how to reference the class in a swc file. But it does not show me the detail about how to reference the gif file in the swc file. It just says:
      " Flex searches the subdirectory named assets in the directory containing the mxml file. If the image is not found, Flex then searches for the image in the SWC files associated with the application.
      "

      But as to my example, none of the following lines could get through the compiler.

      [Embed(source="Logo1.gif")] private var icoLogo1:Class;
      [Embed(source="Assets/Logo1.gif")] private var icoLogo1:Class;
      [Embed(source="Utility/Assets/Logo1.gif")] private var icoLogo1:Class;

      I reveived the same error:
      "unable to resolve .....gif for transcoding ".

      It is clear that the complier could not find the gif file in the swc file.

      So how should i do ?
      thanks.