7 Replies Latest reply on Nov 1, 2017 5:32 AM by felixh66810769

    Load external textfile into animated textfield stops animation.

    felixh66810769 Level 1

      Hello,

      I'm using the Animate CC timeline to create animated textfields.

      Up to now I'm able to change content of dynamic textfields on the fly by inserting keyframes on a "actions" layer and writing this to actions:

      --------------------------------------------

      this.textBox01_txt.text = 'new text';

      --------------------------------------------

      In this case the animation still works.

       

      As long as I don't use externally linked textfile the animation will play fine.

      But if I try to load an external textfile into the textfield, the text will be displayed statically on the start position of the animation, while the other animations

      in the background are running fine. The animation of that layer does not work with external file?!

      I couldn't find any workaround for this in the internet.

      Maybe someone can help me out.

       

      This is my action that I have placed at the very first frame.

      --------------------------------------

      import flash.net.URLVariables;

      import flash.net.URLRequest;

      import flash.net.URLLoader;

      import flash.events.Event;

       

      var testTextLoader:URLLoader = new URLLoader();

      testTextLoader.addEventListener(Event.COMPLETE, onLoaded);

       

      function onLoaded(e:Event):void{

          textBox01_txt.text = e.target.data;

          addChild(textBox01_txt);

      }

      testTextLoader.load(new URLRequest("mytext.txt"));

      ---------------------------------------