Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / July 2008



Tip: Looking for answers? Try searching our database.

sending full xml as parameter to flash

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
रवींदर ठाकुर (ravinder thakur) - 30 Jun 2008 20:10 GMT
hello friends,

i am writing an application that needs to send xml to one flash
object. due to the design, i cannot write xml to the file and then
pass the file name to flash. all i can do is to pass the xml as
argument(flashvars or parameters etc).

I tried looking for this but couldn't find any thing on this. can
someone please give me hints about
a) how to pass xml to the flash(from html/javascript)
b) retrieve the same xml in the .fla/AS3.

once b is done i think i can load it to xml object and then process
it. my .fla is developed in actionscript3

thanks
ravinder thakur
FutureShock - 01 Jul 2008 00:54 GMT
?????? ????? (ravinder thakur) wrote:
> hello friends,
>
[quoted text clipped - 13 lines]
> thanks
> ravinder thakur

2 questions

How do you have your XML represented outside of Flash if its not a file?
How do you view it outside of Flash?

Answer those and I can maybe help out.

Scotty
रवींदर ठाकुर (ravinder thakur) - 01 Jul 2008 04:00 GMT
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.
FutureShock - 01 Jul 2008 05:53 GMT
?????? ????? (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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.