A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Loading Text from txt file

  1. #1
    I'M FED UP!!!

    Okay, I'm loading some variables off of a server via a text file. My script includes the full path (i.e. Http:\\www..... ) to the text file. When I test the program, or run the swf locally on it's own (not within a html file) everything works great!!! It gets the variables, updates the text file etc. etc. However, when I post the SWF file onto the server then try it or try it locally tagged into an html file, it crashes!!! I don't understand!! it's all the same path etc. Basically it works on it's own and not in a Browser. Can anyone help me?!?!?!?!

  2. #2
    Junior Member
    Join Date
    Jul 2002
    Posts
    29
    when you run the swf locally on it's own, are you still calling the server for the txt file or are you calling the file on your hard drive?

  3. #3
    In both cases, I'm calling the text file from the server. This is why I can't understand what the difference is.

  4. #4
    Senior Member chi-styler's Avatar
    Join Date
    Jul 2001
    Location
    Bristol, UK
    Posts
    1,237
    Is the server the text file is on the same as the server you're uploading the swf to?

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Can you post links to the .swf and your text file... I can try to test them out on my free host, to see if this is not a server problem. If that fails, maybe you'll have to post your .fla.

  6. #6
    Okay I've narrowed down the problem but still don't have an answer: My flash file loads variables from a text file (using LoadVariables). The data in the variables are then changed within the swf file. They are then sent back to the text file using an ASP file. Everything works properly up to that point. The swf file then attempts to load the updated variables from the text file but what it loads are the old values. I checked the text file and they are being updated properly. If I close my browser then re-open it it loads the proper values. It has something to do with the browser because playing the swf file own it's own, everything works properly.... ...any ideas??

  7. #7
    Junior Member
    Join Date
    Jul 2002
    Posts
    29
    ah okay,

    the txt file is being cached when you view it online.

    I stole this from Barn over on were-here

    append a variable/value pair to the filename so that the browser perceives it as a distinctly different file:

    loadVariables("filename.txt?nocache="+getTimer(), "target");

    Because the getTimer() value is always different, the file is considered different and will not be retrieved from the cache.

  8. #8
    THANKS A BUNCH!!!

    I figured that's what was happening, but had no idea how to stop 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