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!";
}
};
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!";
}
};