2 Replies Latest reply on Apr 17, 2011 5:56 PM by FearrrKS

    HTML in Flash in need of URGENT help.

    FearrrKS

      Is there any way I can embed HTML in flash? I know I can do this with text boxes but is there any other way I can do it? If not I know theres is the load feature where I can load text from a text file. With the html text box editing, Can i link that to the text file?. As in when you edit the text box with html could i have the textbox's instance name equal to the text file?

       

      With this my issue is with the <a href> in one textbox, I would like when i click those it open another text file in a different text box. Please help.

       

      Clarification:

       

      I have two text boxes in my flash file.

       

      One has current products. And the other is the description of the product they select. I would like a way to edit and change the products in the first text box without having to keep using the FLA file. Which is why i am using this code

       

      var myTextLoader:URLLoader = new URLLoader();
      myTextLoader.addEventListener(Event.COMPLETE, onLoaded);

       

      function onLoaded(e:Event):void {
      trace(e.target.data);
      }

       

      myTextLoader.load(new URLRequest("myText.txt"));
      The contents of myText.txt are
      <a href=(not sure what to put here)> Product 1 </a>
      But all that does is put it in the text output section in flash. It does not show it in flash. I need help getting it to show up in a text box.
      That is the first part
      But the main problem is im not sure how to code the a href correctly so that when i click it, another text file opens in the second text box. So that when a user clicks on a product , like "Product 1" It opens the correct description text file in the second text box. Help? if you need any more details please ask.
        • 1. Re: HTML in Flash in need of URGENT help.
          robdillon Most Valuable Participant

          From your description it sounds like you are using separate text files for each title and description space in your movie. You could accomplish the same goal with, probably, one xml file that contains all of the text that you need to use for every title and description.

           

          With one xml file, you will only have one download. Text and xml files download very quickly, the xml file can be parsed out to any number of variables very quickly and the contents will be available for each of the titles and descriptions as you need to use each one.

           

          I'm not sure if this is a solution to your problem.

          1 person found this helpful
          • 2. Re: HTML in Flash in need of URGENT help.
            FearrrKS Level 1

            Yes that could work but I have NO clue how to implement that, and I'm using this as a splash screen for a product CD