LoadVars on the server is not working

Hi there,
I’m using the LoadVars object to read data from a textfile. Everything works fine when I play my movie locally or on another computer in the network, but when I play it on the server, it does not load any data at all :frowning:

  I've already read about this (http://www.kirupaforum.com/showthread.php?s=&threadid=8661), but still couldn't make my movie work on the server... :-\ 

This is the code I'm using...

// --------------------------------------------
stop();
var _lvit = new LoadVars();
_lvit.onLoad = [COLOR=blue]onDataLoaded_Language[/COLOR];
// --------------------------------------------
[COLOR=blue]function onDataLoaded_Language()[/COLOR]{
	gotoAndPlay(_currentframe + 1);
}
// --------------------------------------------
// Loading language text file...
load_url = "data/ladata.txt";
[COLOR=orange]_lvit.load(load_url);[/COLOR]
// --------------------------------------------

In a later frame I use the textfile's variables loaded in the _lvit object. They should be loaded cause I've used a function to check this, am I right ? 

I.E.:	
[COLOR=crimson]_root.BTN_Map.Txt_Map.text = _root._lvit.t_pmap;[/COLOR] 

But no text is seen on the button unless I hardcode it... And, no trace(variable) is executed either...

Do you have any suggestions for my movie to play correctly on the server ?

Thanks in advance,
	Spongebob.

Hmm, where did u assign the textfile?

Right here:

// Loading language text file…
load_url = "[COLOR=red]data/ladata.txt[/COLOR] ";
_lvit.load(load_url);

Is it wrong if I do like that ? :*(

Thanks!
Spongebob

Hmm, sorry, i mean which var is being assigned to the Dynamic text field, i just want to to tell u to assign it onLoad, so it would solve the timing in yar server!!

I’m assigning a var called t_pmap from the textfile to the dynamic text…

Is that what you’re asking me ? My english is not very good and sometimes I just don’t get it, sorry :frowning:

root.BTN_Map.Txt_Map.text = [COLOR=seagreen]_root._lvit.t_pmap[/COLOR];

How do I assign it onLoad ?

Thanks,
Spongebob

On yar function:

function onDataLoaded_Language(){
_root.BTN_Map.Txt_Map.text = _root._lvit.t_pmap; 
gotoAndPlay(_currentframe + 1);
}

Test it, and come back tell us how it goes!

Hi h88,
Tested it but it didn’t work out :frowning:

What I don’t understand is why all of my code works fine offline and it doesn’t work online :*( Shouldn’t it be the same ?

Are there any other things I can try ?

Lots of thanks,
Spongebob.

Hmm, thats really odd, “onLoad” should assign the var in ur txtfile when its loaded! can i have a look at ur fla?

Sure !! :slight_smile: I made a small example which still works offline only…
Here is the attached file…

I’ve just put it on the server and nothing displays on the button :frowning:

Thanks!
Spongebob.

Ok, everything is solved now, check the attached ZIP, and tell me how it goes:

1- The first problem was that u didnt define onLoad properly.

2- Don’t ever name folders like this “DATA” while on ur swf its “data”, when its offline, there is no case-sensitivity problem, but in your website, there is.

Anyways, tell me how it goes.

yours,
h88

Yeeees !! you did it! :rambo:
It worked perfectly!! I’m soooo glad! =)

Millions of thanks to you h88 !!
Spongebob

No problem. :slight_smile: