PDA

View Full Version : loadvars from remote location?


StickeR
08-03-2006, 01:24 AM
Hi all,
I hope this could be clariefied for me, I am trying to load information fro a php file on my site.
Just to clarify, in the end it need to be run from a users harddrive, not online.
It doesn't work :(

when doing the same from my harddrive it works, but when trying from www it gives 'undefined'.

i have this for code:
loadText = new LoadVars();
loadText.load("http://www.mysite.com/flash.php");
loadText.onLoad = function() {
_root.sho.text=this.flashtext;
};
What am I missing?

Navarone
08-03-2006, 01:06 PM
I have always used loadvars to load in a text file. Are you sure you can load in a web page?


MyLoadCID = new LoadVars();
MyLoadCID.load("CdTypes/ID.txt");
MyLoadCID.onLoad = function(success) {
if (success) {
//trace("done loading");
myTxt = MyLoadCID.ID;
info(myTxt);
} else {
trace("not loaded");
}
};

StickeR
08-03-2006, 10:45 PM
It works when using it like:
load("flash.php") <- locally from my HD swf to my HD php
load("flash.php") <- from the server to the server
load("http://mysite.com/flash.php") <-from the server to the server

But it refuses to load the info from the webpage to a local swf file.
and the file has access to the internet, that can't be it.

I wanted it to load the latest news from my webpage, to a flash file on my HD.
If anybody has other ideas, solutions, explanations or whatever, your input is greatly appreciated at this point.