2 Replies Latest reply on Sep 18, 2007 12:27 PM by mike93

    Loading Variables

    mike93 Level 1
      Hi,
      I was hoping that someone could help me out with this. I have a SWF that plays a FLV with actionscript cue points that when the cue point is reached the timeline plays. I need the cue points variables (the timecode) to be loaded from a text file because non Flash users will be adding content. The problem is that I can get it to work with putting the variables in the actionScript. But if I load the variables from the text file the playhead will not play with the cue point is reached. Below is the code that I am using.

      Thanks in advance.
        • 1. Re: Loading Variables
          Lujunq Level 1
          While loading the values from the text, instead of this, use the loadVars instance name. I believe "this" will point "outside" your loadVars instance.

          if (success) {
          cuePoint0 = loadtextContent.cue1;
          cuePoint1 = loadtextContent.cue2;
          cuePoint2 = loadtextContent.cue3;
          cuePoint3 = loadtextContent.cue4;
          cuePoint4 = loadtextContent.cue5;
          }

          I always used loadVars this way and everything goes fine...
          • 2. Re: Loading Variables
            mike93 Level 1
            Lujung,

            Thanks for your help. When I try the script you provided I get undefined when I trace cuePoint1. But if I use this instead of the loadtextContent I get the proper value.