i will be generating the xml at runtime. basically i want to draw a
graph by getting data from DB. and way i am passing data to flash is
by encoding it as xml.
?????? ????? (ravinder thakur) wrote:
> i will be generating the xml at runtime. basically i want to draw a
> graph by getting data from DB. and way i am passing data to flash is
> by encoding it as xml.
If data is on a webserver DB such as MySQL, then you can format output
to XML using a scripting language such as PHP. Then in Flash load up the
scripted page into an XML object using the XML() Class.
Example:
var xmlData = new XML();
xmlData.load("myXMLData.php");
Of course I am still making some assumptions on the location of your data.
If I am getting warm as to what you are doing, I can give more details.
If it is a local DB not severed up by a webserver then I would be lost too.
Scotty
रवींदर ठाकुर (ravinder thakur) - 05 Jul 2008 06:55 GMT
i am using google app engine to deploy my app so the db access is not
available in a manner we have in typical RDBMS. i cannot even write to
file also. all i can do is to create an xml string and pass it over to
flash in string format only. my confusion is about passing xml as
string to flash.
FutureShock - 06 Jul 2008 02:34 GMT
?????? ????? (ravinder thakur) wrote:
> i am using google app engine to deploy my app so the db access is not
> available in a manner we have in typical RDBMS. i cannot even write to
> file also. all i can do is to create an xml string and pass it over to
> flash in string format only. my confusion is about passing xml as
> string to flash.
I am not 100% on this, but if your string is a well formed XML format
then the XML object should work.
var xmlDoc = new XML();
xmlDoc.load('url to your string location');
xmlDoc.onLoad = parseDoc;
function parseDoc(status) {
if(status) {
trace("xml load successful, child nodes = "+xmlDoc.childNodes.length);
} else {
trace("unable to load xml");
}
}
Scotty