2 Replies Latest reply on Jun 27, 2008 8:41 AM by andy-man

    Loading Dynamic Text

    andy-man Level 1
      Here's the prob...

      I've created a dynamic text field, and I'm loading text from an external file using the following code:
      loadVariablesNum("testimonials1a.txt",0);

      Works fine...

      The problem occurs when I attempt to place that Flash document into another Flash document, using the following code:
      mc_loader.loadMovie("testimonials.swf");

      The document loads fine; however, the dynamic text field does not load the text. So, it works as a standalone document, but not when it's embedded into another Flash document.

      The key is probably in the loadVariablesNum("testimonials1a.txt",0); part of the equation; however, the solution seems to elude me. Any help would be appreciated.

      Andy Anderson
        • 1. Re: Loading Dynamic Text
          clbeech Level 3
          yeah this would be because you are targeting level 0 in the loadVariablesNum method - and when you load the swf file in the 'root' of the doc is getting changed. although you can still load the txt a var at that level - other calls within the testimonials.swf that rely on 'finding' that var name - are looking in the wrong place. so in the text string assignment - call back to root to find the var:

          my_field.text = _root.theVar;
          • 2. Re: Loading Dynamic Text
            andy-man Level 1
            Thanks for the quick reply.