Hello, this is my first post here and finding lot of usuful information so far on this site, but before I get distracted with all that other stuff im having an issue trying to pull information from my database into flash.
I was using this code to pull information from an xml file looping through and storing the values in an array so I can use later.
// Arrays to hold all the picture data
var picturePathList:Array=[];
var thumbPathList:Array=[];
var pictureTitleList:Array=[];
var pictureDescList:Array=[];
function loadTheXML() {
var xmlURLLoader:URLLoader = new URLLoader();
var xmlURLRequest:URLRequest = new URLRequest( urlVar );
xmlURLLoader.load(xmlURLRequest);
xmlURLLoader.addEventListener( Event.COMPLETE , sortTheXML );
function sortTheXML(event:Event):void {
var theXMLData:XML = new XML( xmlURLLoader.data );
var a:Number = theXMLData.picture_path.length();
totalPics = a;
var b:Number = 0;
// Loop to load the data into array
while (b < a) {
picturePathList.push( theXMLData.picture_path[ b ]);
thumbPathList.push( theXMLData.thumb_path[ b ]);
pictureTitleList.push( theXMLData.picture_title[ b ]);
pictureDescList.push( theXMLData.picture_desc[ b ]);
b = b + 1;
}// end while loop
How can I do the same but with a database I figure the code cant be to different. Im using PHP to get my data and put in a name/value set. Reason I want to know if there is a similar way to write the code for getting my data from database is cause I'm still learning AS3 stuff and the XML code above i have decent understanding and if i can dupilcated it for a database it would keep me from getting to confused. Any Help anyone can provide I will be greatful.