1 Reply Latest reply on Apr 11, 2008 2:28 PM by slaingod

    Read/Access objects from external SWF files

    Grey Cardinal
      I have for weeks been trying to access/read objects from external SWF files without any success.
      I load SWF file into my Flex application, but how do I go further to access all objects of that MovieClip?
      Is there any way to parse all objects of loaded MovieClip(SWF) in order to read the text?

      I basically want to search SWF files as if it was PDF files. FlashPaper2 has this function and its only 1 SWF files so some how it must be possible. I just have no idea where to look or where to start.

      I can get the text out of SWF using swfstring or swfdump - but that is almost useless as it cant be used to mark words with "live" search...

      SWF example
      SWF file from PDF2SWF

      Thank you
        • 1. Re: Read/Access objects from external SWF files
          slaingod Level 1
          Assuming you have already figured out how to use SWFLoader to load your content in the case of a normal SWF, and your SWF is an AS3 SWF, you should be able to traverse the children of the stage using getChildren and getChildAtIndex, recursively.

          If these are AS2 based files you are SOL I believe, at least in Flex 2/3. Otherwise you will need to build some functionality into your PDF2SWF output to provide the same search internally in the swf, and use ExternalInterface or LocalConnection to communicate between the two.

          I'm not 100% on this tho, just what I think is possible.