There are a number of ways to do this. On kirupa.com you will find tutorials on the subject. Maybe http://www.kirupa.com/developer/actionscript/flashphpxml_integration.htm one is for you.
I don't understand the tutorial... especially the part about flah code.... how could i change the flash code(i mean actionscript) given to suit the php script i am getting the information from?
LuigiL - 30 Jul 2005 15:18 GMT
Here is a generic example which you can tweak to your needs.
// results returned from PHP
n=2&item0="<a href='url'>First News</a>"&item1="<a href='url'>Second News</a>"
// ActionScript
//myText is a dynamic textfield on the stage
myText.html=true;
var myNews:LoadVars=new LoadVars();
myNews.onLoad=function(success:Boolean){
if(success){
//clear previous news
myText.htmlText="";
for(var i=0; i<this.n; i++){ // here we use n (this.n) coming from PHP to
limit the loop
myText.htmlText+=this["item"+i] + newline; // all news items on new lines
}
} else {
myText.text="Unable to load the news."
}
};
myNews.load("urltoyourphpfile");