A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Help Plz

  1. #1
    Junior Member
    Join Date
    Nov 2002
    Posts
    19

    Help Plz

    I have searched the tutorials on flashkit and none work for me but I need to figure out how to pull names from a text file.

    for example: In my flash file I have a list of names that needs to be updated every so offten and it is to much trouble to go in and edit the text in the FLA so i was wondering how to pull from a text file that I can easily edit.

    Can anyone help, please.

    Thanks
    Have you ever felt like tommaro was yesterday and today hasn't come yet?

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Posts
    398
    Out of flash help.... a good example as it uses a callback function that tells you when the variables are loaded...

    The following example loads information from a text file called params.txt into the target_mc movie clip that is created using createEmptyMovieClip(). The setInterval() function is used to check the loading progress. The script checks for a variable in the params.txt file named done.

    Code:
    this.createEmptyMovieClip("target_mc", this.getNextHighestDepth());
    loadVariables("params.txt", target_mc);
    function checkParamsLoaded() {
      if (target_mc.done == undefined) {
        trace("not yet.");
      } else {
        trace("finished loading. killing interval.");
        trace("-------------");
        for (i in target_mc) {
          trace(i+": "+target_mc[i]);
        }
        trace("-------------");
        clearInterval(param_interval);
      }
    }
    var param_interval = setInterval(checkParamsLoaded, 100);
    the pasprams text file includes the following text ->
    var1="hello"&var2="goodbye"&done="done"

    hop that helps..

  3. #3
    Junior Member
    Join Date
    Nov 2002
    Posts
    19
    That doesn't quite help, cuase the Load Variables function still doesn't work for me. Where should the text file be relitive to the the SWF?
    Have you ever felt like tommaro was yesterday and today hasn't come yet?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center