PDA

View Full Version : Loading Dynamic Text On server



l9Ul
November 7th, 2002, 12:56 AM
*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....

h88
November 7th, 2002, 01:51 AM
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:

Dravos
November 7th, 2002, 02:40 AM
Try loading variables into _root:

loadText.load("LINK.txt", _root);

h88
November 7th, 2002, 02:43 AM
Originally posted by Dravos
Try loading variables into _root:

loadText.load("LINK.txt", _root);

not sure if u really can do that!!

Dravos
November 7th, 2002, 02:51 AM
?? Can u not, i must be thinking of something else, just ignore that last comment then!!

Dravos
November 7th, 2002, 02:54 AM
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);

h88
November 7th, 2002, 03:12 AM
look again at the mx reference:

LoadVars.load

Availability

Flash Player 6.

Usage

myLoadVars.load.(url)

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

Dravos
November 7th, 2002, 04:40 AM
I should really drink some coffee when i wake up

dravos._status=*******;

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

SOrry h88

h88
November 7th, 2002, 04:48 AM
Originally posted by Dravos
dravos._status=*******;

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

yours,
h88

l9Ul
November 7th, 2002, 09:16 AM
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...;) (INFO is the Instance Name of the dynamic text beside [i] , rollover codes are loaded into movie clip LINK.A and LINK.B)

http://9unet.hypermart.net/

thanks for the reply...

h88
November 7th, 2002, 10:56 AM
could u post ur code plz!

yours,
h88

h88
November 7th, 2002, 11:28 AM
i tried that one, it Worked!


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

Hope this helps!

yours,
h88

h88
November 7th, 2002, 11:29 AM
Button code would be:


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

yours,
h88

l9Ul
November 7th, 2002, 12:37 PM
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

l9Ul
November 7th, 2002, 05:50 PM
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:

h88
November 7th, 2002, 06:18 PM
:P, forgot to add _root, some silly ....... :P :P

yours,
h88

l9Ul
November 7th, 2002, 06:24 PM
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?

:(

h88
November 7th, 2002, 06:31 PM
y dont u just load ur textfiles Once!