dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Uhhh... loadVars??? HELP!!!!!

  1. #1
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126

    Uhhh... loadVars??? HELP!!!!!

    I am a fairly versed action scripter, but Its definitely nothing to brag about. I have used the "loadVars" object many time before, and have never had a problem. I have not used this feature in a while, but now that I try to do it, it isn't working!

    here is my script...

    key = new LoadVars;
    key.onLoad = DataLoaded;
    key.load ("key.txt");

    function DataLoaded (success)
    {
    if (success){
    trace (key.my_property);
    element ("Edit").text = key.my_property;}

    else trace ("failed");
    }
    when I play the movie, the result window says that it

    cannot load the url 'key.txt'
    failed


    THIS SHOULD WORK!?
    Can anyone help me?

  2. #2
    3DFA hobby scripter LewxX's Avatar
    Join Date
    Jul 2006
    Location
    Germany, Karlsruhe
    Posts
    198
    Could you attach the files, please?

    *.movie & key.txt
    sorry for my bad school English
    btw. visit my Page: projects.lewxx.de
    or lewxx.de (<= German)

  3. #3
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    Ok, I've uploaded the files, but now I have noticed that if I export the file, it will load the variables, but not if I'm in 3dfa. Not that its that big of a deal, but does anyone else have this problem? I hate having to export just to test the movie...
    Attached Files Attached Files

  4. #4
    Member
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    76
    The .movie file has to be found in the same directory as key.txt...

    You can also try to use the full path of the file, e.g. "c:/flash/key.txt"

  5. #5
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    I know that it has to be in the same directory, and it is... but it still won't read unless its exported.

  6. #6
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    Im still having this problem....

  7. #7
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    It says that the file can't be loaded, but on export it works fine....
    is this how its supposed to be?

  8. #8
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    hmmmm I guess I'll just have to live with it

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