0 Replies Latest reply on Aug 24, 2011 1:09 PM by SupraJohde

    Using dynamic text in Flash Builder

    SupraJohde

      Hi,

       

      I'm trying to get some dynamic text to my web page. The text is readed from .txt file

      I use AS script which i was using in a project I made with Flash Pro and now i try to implement it in Flash Builder project

      The script look like this:

       

      var req:URLRequest = new URLRequest("design_1.txt");

      var loader:URLLoader = new URLLoader();


      function textLoaded(event:Event):void

      {

      design.text = loader.data;

      }


      loader.addEventListener(Event.COMPLETE, textLoaded);

      loader.load(req);

       

      So first I made a project with Flash Catalyst and in there I created an area text element. Then I imported the project to Flash Builder and put the AS script in the <Script> section and gave the <RichText> an id="design".  The text is just simple text and formatting happens in richtext element.

       

      So, when i try to compile the FB project it give me and parse error "undefined property error req", "undefined property error loader" etc.

       

      So should i alter the AS script for FB or is there something else wrong? I tried to google how to use dynamic text in FB but couldn't find any easytyutorials. I'm mostly a desginer so coding isn't my speciality. But thanks for help!