3 Replies Latest reply on Jun 29, 2007 6:26 AM by kglad

    external text issue

    adamon Level 1
      I have tried to look up this issue in the flash help, lynda.com and here with no luck.

      I have an issue with external text that I import. The text loads fine but when I click to go to another frame in the same timeline the previous text stays and the new text renders over the previous text. How do I delete the previous text file when I click to go to another section.
      Here is the code that I am using:


      var externalText:TextField = new TextField();
      var externalFormat:TextFormat = new TextFormat();
      var externalRequest:URLRequest = new URLRequest("../textFiles/home.txt");
      var externalLoad:URLLoader = new URLLoader();

      externalLoad.addEventListener(Event.COMPLETE, textReady);

      up_Btn.addEventListener(MouseEvent.CLICK, scrollUp);
      down_Btn.addEventListener(MouseEvent.CLICK, scrollDown);

      externalText.x = 34.6;
      externalText.y = 42.1;
      externalText.width = 374;
      externalText.height = 211;
      externalText.border = false;
      externalText.wordWrap = true;

      externalFormat.font = "Humanst521 BT";
      externalFormat.color = 0xffffff;
      externalFormat.size = 13;


      function textReady(event:Event):void
      externalText.text = event.target.data;

      function scrollUp(event:MouseEvent):void
      externalText.scrollV --;

      function scrollDown(event:MouseEvent):void
      externalText.scrollV ++;

      fuseDrinks_Btn.addEventListener(MouseEvent.CLICK, fdClick);

      function fdClick(event:MouseEvent):void

      fuseFood_Btn.addEventListener(MouseEvent.CLICK, ffClick);

      function ffClick(event:MouseEvent):void

      fuseRes_Btn.addEventListener(MouseEvent.CLICK, frClick);

      function frClick(event:MouseEvent):void

      Thanks for any help with this.