Topic: LoadVars Bug?

Hi all,

I have  simple script that I want to use to load a text tile with each frame (very slow framerate, 1 FPS or less).

this.onEnterFrame = function() {
loadText = new LoadVars();

    loadText.load("test.txt");
    loadText.onLoad = function() 
    {
        foo.text = this.foovar    
    };
    

};

Where foo is a dynamic text area and foovar is the variable I'm pulling up.

When I run this on my computer, I can change the value of foo and it reflects properly in the running movie, on the chumby it load the variable at first, but does not update properly.  As in

If foovar=1000 when I start the movie, I see "1000" on the screen.  But if I change foovar=2000, it doesn't reflect on the chumby until I restart the movie.

Thanks in advance

Dan

Re: LoadVars Bug?

Chances are this data is being cached by the player on the first load and the second and subsequent loads are being short circuited.

I'm not sure if there's a Flash Lite solution for local files, but the typical Flash trick with data pulled from the networks is to change the URL to fool the cache.

For instance, you might do something like:

something.load('http://www.example.com/somedata?'+(new Date()).getTime());

Ideally, the server would be setting a "no-cache" HTTP header that would tell the player that the data should not be cached.  However, with files, there's no way to set any type of header to discourage caching.

Re: LoadVars Bug?

That did it! 

Thanks.