4 Replies Latest reply on Oct 9, 2006 11:16 AM by sbryner

    Dynamic Text not loading

    sbryner Level 1
      hello,

      I have a one frame movie with the attached code in the actions layer.

      I have a notepad file named "info.txt" in the same folder as my .swf is published.

      what is wrong. I can't get it to work.

      help...

      sky
        • 1. Re: Dynamic Text not loading
          injpix Level 3
          You need to place this line of code;
          infoText_txt.text=whyUs;

          ...in the if(success) statement.
          • 2. Re: Dynamic Text not loading
            sbryner Level 1
            thanks,

            I figured that out.... I think my other problem is don't you need to have an button to call it. say in my first post it should be...

            theBtn_mc.onRelease() = function{
            infoText_txt.text = whyUs;
            };

            instead of just using

            infoText_txt.text = whyUs;

            won't work.
            • 3. Re: Dynamic Text not loading
              injpix Level 3
              Yeah, you can also nest that line of code in a button event handler as you mentioned. Notice the onLoad and onRelease functions are indeed “event” handlers. Events are what trigger things to happen.
              Also you are correct that this line directly after the onLoad function will not work. It’s because Flash will read that line before the event (info.txt loads). I guess an analogy that comes to my mind is…
              Suppose you are ready to open a wrapped gift and someone ask you what is in it.

              So to analyze that;
              “Suppose you (pretend ‘you’ are Flash) are ready to open a wrapped gift (load info.txt file) and someone (infoText_txt.text) ask you what is in it (the variable, ‘whyUs’).

              You will only know what is inside of the gift after, you have opened (in this example, ‘load it’) it.
              • 4. Re: Dynamic Text not loading
                sbryner Level 1
                thanks for the explanation. I think I understand better now.

                again thanks,