3 Replies Latest reply on Jul 3, 2007 7:44 AM by Greg Dove

    Flash reading HTML

      Is it possible for flash to 'read' the HTML page in which it's embedded?

      For instance there is a parapgraph in there wich would look something like

      <p>Just some random text.</p>

      Can I somehow use this to display in my Flash movie?
        • 1. Re: Flash reading HTML
          kglad Adobe Community Professional & MVP
          not with as2. however, you can read some data from the html file if you use a specific syntax: see flashVars.

          with as3, an entire html page can be loaded into flash and parsed using its string methods.
          • 2. Re: Flash reading HTML
            BarryGee Level 1
            I havent tried this but it may be worth giving it a go. Flash can load html text into a dynamic text box. You might try directing the text box to the exact url for the page you want to load. There are limitations to what you can load into these text boxes, for example you couldnt load a swf (or at least thats my understanding?) but you can load plain text, html, xml, images(jpg, png, gif).

            • 3. Re: Flash reading HTML
              Greg Dove Level 4
              @kglad: do you mean you need to pass the url as a flashVar to the the swf?

              If so, you can get access to the html source of the containing page from as2:

              e.g. if you pass a pageURL flashVar with the url of the containing page, this will put the page source in the a textfield on stage: