PDA

View Full Version : Loading external php file


NapalmDeath
12-09-2007, 12:31 AM
Hi All,

Can anyone help me with loading an external php file.

Is it just like loading and external html file ? Ive tried converting the below files names to a .php equivelant, but its not working
thanks



testtxt.html = true;
var format = new TextField.StyleSheet();
//path to the css file
var path = "test.css";
var myVars:LoadVars = new LoadVars();
// Define onData handler and load text to be displayed.
myVars.onData = function(myStr:String):Void {
if (myStr != undefined) {
var quick = myStr;
format.load(path);
format.onLoad = function(loaded) {
if (loaded) {
testtxt.styleSheet = format;
testtxt.text = myStr;
} else {
//throw an error if we cannot find the css file
testtxt.text = "Error loading CSS file!";
}
};

NapalmDeath
12-09-2007, 07:29 AM
Just to ellaborate.

I have built a flash site & i am using a Content Management client to parse the info to the page to update. This does so by php file.

So is there a way I can have flash load this php file ?