PDA

View Full Version : Dynamic External File Access


Hex
02-06-2006, 10:47 PM
Ok.... so... complicated enough title, simple enough question.

Can flash go to out to a folder, a website, whatever, copy the data from the file, and hold it as a string or whatever it may be while also updating whatever you want to show on screen?

Lui
02-06-2006, 11:07 PM
so your thinking of making a news thingy?

Hex
02-06-2006, 11:24 PM
Nah, actually, i'm trying to integrate flash and java to make a chat program for my school server...

But, since I can't run anything server side, I have to have each client independant of each other.

Lui
02-07-2006, 12:11 AM
Nope, sorreh, you would have to depend on TBC on that one.

arkhan
02-07-2006, 03:43 AM
look in the flash help files for loadVars and setInterval
then you can experiment a bit, and if you cant get it working come back here..

The Brown Cow
02-07-2006, 10:25 AM
The loadVars and XML classes will be your friends.

Make a file named mydata.txt and type this in it:
myString=This is some text to display in Flash

In Flash, you can load it in with loadVars...
loader = new LoadVars();
loader.onLoad = function() {
trace(this.myString);
}
loader.load("http://mydomain.com/mydata.txt");

Lui
02-07-2006, 11:46 AM
Yeah, I was going to tell that to Torrent, thats what you gave me for my news thing, but I suppose it would work for other loaders.