my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes Ajax and Flash Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Ajax and Flash" Watch "Ajax and Flash" New topic

Ajax and Flash

Fran�ois De Grandi

Joined: Oct 27, 2003
Posts: 4
What would be the advantages of processing data with Ajax to and from a Flash embedded object in the HTML page, instead of using Flex or Lazlo technologies ?

Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
I think it would be much simpler..

<a href="" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="" target="_blank" rel="nofollow">Java Weblog</a> | <a href="" target="_blank" rel="nofollow">Computing Articles</a>
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Originally posted by Neerav Narielwala:
I think it would be much simpler..

where we consider your reply ? mean in above question

[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Kris Hadlock

Joined: Nov 14, 2006
Posts: 26

You could always use the send, load and sendandload methods in Flash to accomplish server-side integration as well. In terms of using Ajax, I wrote an article for InformIT about using the ExternalInterface to communicate with Ajax, you can check it out here.

The issue with these options is that you cannot transfer objects easily, rather you would need to serialize them as XML or JSON. With that said, you can still accomplish some powerful data transfers with the options listed above. It all depends on what you are looking to do.

<a href="" target="_blank" rel="nofollow"></a><br /><a href="" target="_blank" rel="nofollow"></a><br /><a href="" target="_blank" rel="nofollow"></a><br /><a href="" target="_blank" rel="nofollow">Ajax for Web Application Developers</a>
Fran�ois De Grandi

Joined: Oct 27, 2003
Posts: 4

Thank you very much for the precious hints about JSON. I have tapped into your articles, and I will now explore the options of using JS Objects in that manner.

The only link that I do not see clearly yet is the Server Side of the process :

- I am building a WebApp with Ruby on Rails, which stores data for estimating House Remodeling Costs (Measurements, Unit prices etc.) : the user inputs the measurements of the rooms (e.g. building elements) she needs to remodel, ideally with a visual interface (that's the reason for the use of Flash), and the App (Server and/or Client) calculates the resulting costs (Unit prices are fed via another 'back-office-modelUpdating interface)

- now how do I generate/serialize JSON data on the Server side to send back to be de-serialized on the Client side ? I suppose I can write parsing code for my Ruby-ServerObjects (which are connected to the MySql database) : I just need some hints about pitfalls to avoid and Best Practice essentials in that matter

Thank you again,

Consider Paul's rocket mass heater.
subject: Ajax and Flash
Similar Threads
WA #1.....word association
AJAX & Flash
Ajax vs Flash?
Competing products
Ajax X Flash