Flash – JSP. Advice on loading variables.

Hi All,

I need to retrieve data from an Oracle database and will do this with JSP. I will declare variables and assign their values from the retrieved data…


Now, I need to load these variables into a Flash Movie where some will be printed on the screen, such as ‘strName’, ‘strCompany’, strTel’… while others will be numeric values which will be filtered and used for calculations etc.

What is the best way to do this?. I was thinking XML, but then read somewhere that the values can be loaded directly from these JSP variables.

Please advise…

Kind regards


Aplimedia
LVL 10
aplimediaAsked:
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.

ArulPrasad1Commented:
ya, If its just a few values, you can pass it back to Flash using the JSP equivalent of ASP's response object. In Flash, use LoadVars to load the JSP page, and u can get back the response into another LoadVars object.

Check out the documentation on LoadVars.sendAndLoad() method for the implementation details.

if what you are sending back from JSP is a complex resultset, you might need to consider using XML. Or, if u would want to use native objects, and if there would be frequent data transfers, try out Flash remoting for Java ( or the Open Source Alternative for macromedia Flash remoting, 'OpenAMF' (http://osflash.org/openAmf))

~Arul Prasad

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
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.