Pssing objects between flash and javascript

I am trying to pass a large object from flash to javascript/ coldfusion. What is the best way to do this

iv tried doing something like this  and worked ok

var  greeting = String("sayHello",obj));

but i also want to try getUrl where does the obj go in getUrl

getURL("scripts/nmbh13th_submiths.php", "", "POST");

or are there other ways that i can do this

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

to communicate to Javascript use and ExternalInterface.addCallback . To receive data via POST, use LoadVars in Actionscript 2.0 or URLLoader in Actionscript 3.0. If you need example, tell me and I send you, just tell what you need to know. Also know that ExternalInterface converts primitive object types from AS to JS and vice-versa, so you can use an complex object from on e to the other.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
also you can use JSON to tranport data in decodable string format if you are having problems. Just download the JSON library for actionscript and fot javascript in links below. Just to clarify, JSON is a way to serialize/encode objects (no matter how complex or deep they are) into small strings, and then decode again. So you can turn your AS Object into a string pass to JS, decode and use. Then encode again send to Actionscript decode and use it.It s much smaller and easier to use than XML for instance.

Here you can learn more about json

AS 2.0

AS 3.0

jockmahon01Author Commented:
well im am currently using the External call and can get it to js but i dont know how to read and use it at the js end.basically i am trying toget around the print dialog that comes when printing in flash so am using scriptx to auto print the content i send from flash to js and then print
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

So you want to learn how to pass arguments from JS to flash? It so let me know so I can get you an example.
jockmahon01Author Commented:
i have changed this to use xml.send instead
I'm sorry I did not understand your statement:
"i have changed this to use xml.send instead"

If you need more help let me know.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.