Loading Dynamic Text On server

*Action in first frame:

loadText = new loadVars();
loadText.load(“LINK.txt”);
loadText.onLoad = function()
{
_root.INFO.htmlText = this.LINK1;
};
stop();

*text loads okay

*Action in a movie clip:

on (release)
{
_root.gotoAndStop(2);
}

on (rollOver)
{
loadText = new loadVars();
loadText.load(“LINK.TXT”);
loadText.onLoad = function()
{
_root.INFO.htmlText = this.LINK1;
};
}

*On mouseover, the dynamic text doesn’t load and the text loaded before (from frame 1 action) dissapears…

So wuts going on there? ;( HELP~

OH…BTW everything works fine OFFLINE (load swf from HD) … this problem occurs when i upload everything onto the server and try to load swf from the net…

y dont u have a look at this thread: http://www.kirupaforum.com/showthread.php?s=&threadid=8292

and another thing: Why do u want to load variables 2 times in the movie:q: :q:

Try loading variables into _root:

loadText.load(“LINK.txt”, _root);

*Originally posted by Dravos *
**Try loading variables into _root:

loadText.load(“LINK.txt”, _root); **

not sure if u really can do that!!

?? Can u not, i must be thinking of something else, just ignore that last comment then!!

Just looked at the actionscript dictionaryt

<B>Usage</B>

loadVariables (“url” ,level/“target” [, variables])

so it should be able to handle

loadText.load(“LINK.txt”, _root);

look again at the mx reference:

LoadVars.load

Availability

Flash Player 6.

Usage

myLoadVars.load.[SIZE=5](url)[/SIZE]

Parameters

url The URL from which to download the variables.

Returns

A string.

Description

Method; downloads variables from the specified URL, parses the variable data, and places the resulting variables into loadVarsObject. Any properties in loadVarsObject with the same names as downloaded variables are overwritten. Any properties in loadVarsObject with different names than downloaded variables are not deleted. This is an asynchronous action.

The downloaded data must be in the MIME content type application/x-www-urlform-encoded. This is the same format used by loadVariables.

This method is similar to the XML.load method of the XML object

I should really drink some coffee when i wake up

dravos._status=dumbass;

it didnt even match what i was looking at, too much scripting can be bad :stuck_out_tongue:

SOrry h88

*Originally posted by Dravos *
dravos._status=dumbass;

liked it, ill change my status as the above one :stuck_out_tongue:

yours,
h88

Well…i loaded the text first to make sure that text can be loaded. Still dunno wuts wrong…i mean how come it works fine on my HD and not on the net…why dont’ you look at the swf i uploaded…:wink: (INFO is the Instance Name of the dynamic text beside * , rollover codes are loaded into movie clip LINK.A and LINK.B)

http://9unet.hypermart.net/

thanks for the reply…

could u post ur code plz!

yours,
h88

i tried that one, it Worked!

loadText = new LoadVars()
loadText.load("LINK.txt");
loadText.onLoad = function(){
getURL(loadText.LINK1)
}

Hope this helps!

yours,
h88

Button code would be:

stop();
aaa.onRelease = function(){
	_root.gotoAndPlay(2);
}

yours,
h88

Still the same problem…

I included the code…if u still wanna take a look at it…

Try running the swf off u’r HD then try running the one i uploaded on to http://9unet.hypermart.net/
u’ll see the difference…(the rollover doesn’t work anymore)…
Thanks again for u’r reply

on (rollOver) {
loadText = new loadVars();
loadText.load(“LINK.TXT”);
loadText.onLoad = function() {
_root.INFO.htmlText = _root.loadText.LINK1; //<<<<<
};
}

“_root.loadText.LINK1”
instead of
“this.LINK1”

:rambo:

:P, forgot to add _root, some silly … :stuck_out_tongue: :stuck_out_tongue:

yours,
h88

Arh more problem…
looks to me that the text file is reloaded everytime when a rollover event occurs…which cause a long delay(server is slow?)…

that doesn’t happen offline…geezzz …why can’t the stuff i do offline be exactly the same as online…

wut can i do to solve this? preloaders? dl all the textfile on the client’s pc first? if i do that how do i link to those files?

:frowning:

y dont u just load ur textfiles Once!