[thelist] Flash experts? Flash and Ajax?

John Dowdell jdowdell at adobe.com
Mon Dec 26 21:44:10 CST 2005

Tom Dell'Aringa wrote:
> I'm finding implementing a good isometric grid in html problematic

 From what I read in the message, I'm not sure why a still graphic (PNG, 
JPG, GIF) would not work...?

 > I suppose I could look at Flash, but I'm wondering if it has the
 > ability to work asynchronously with the server like Ajax does.

Yes, Macromedia Flash Player 3.0 and above (think I got my versions 
straight, but it's from memory ;-) have been able to request fresh text 
from the server and integrate it into the current display. I think it 
was version 4.0 which introduced the first integrated XML parser. 
ECMAScript for XML is in the current alpha, Macromedia Flash Player 8.5, 
anticipated due for general consumer release mid-2006.

 > I want to build the back end with Ruby on Rails and a mySQL
 > database. I just am ignorant of how Flash could interact with
 > these tech's.

Sure, the Flash Player client can call out to lots of remote services, 
stronger than browsers. More may depend on what you're comfortable 
implementing on the server. The easiest and fastest is Remoting, where 
local objects and remote objects match state automatically, but if you'd 
prefer to hand-roll things in Ruby then any of the common transfer 
methods should work.

(For security issues, it's easiest to implement if your application 
server and your web server are in the same exact domain. That's because 
the client software can work behind someone else's firewall, so it's not 
allowed to call arbitrary servers without explicit permissions to do so. 
Proxying third-party data through your own application server is another 
way to access data from arbitrary servers, because your appserver is 
outside of the audiences' firewalls. Anyway, single-domain is easiest.)

Ian Anderson wrote:
 > In many ways, the recent crop of AJAX deployments is simply
 > catching up with stuff that Flash apps have been doing for
 > some time.

I'd agree, but it can get hard to talk about online... sometimes when 
people say "AJaX" they're talking about work with XmlHttpRequest, 
sometimes they mean advanced JavaScript in general, sometimes they may 
mean something else. The meaning of the label often shifts, so it's hard 
for discussions to reach consensus right now.

Text is just one media type to refresh independently of the presentation 
itself. HTML browsers have long had the ability to refresh static 
graphics, too, through JavaScript manipulation of IMG.SRC. Interactions, 
motion sequences, audio, video, communications... there are lots more 
media types than just text and bitmaps, but that gets more into the 
"Rich" in "Rich Internet Applications" than the straight XmlHttpRequest 

Tom Dell'Aringa wrote:
 > I suppose Flash has the ability to scale incrementally as
 > large groups of users came online

This confuses me -- the Macromedia Flash Player is a clientside engine, 
sitting on Someone Else's Computer, and so wouldn't really notice other 
users, at least in most applications. It's the server which generally 
needs to scale with the size of the audience and its demands. I'm not 
sure what info is being sought...?

 > I seem to remember Actionscript being touted as "almost the
 > same thing" as JavaScript. Is this still/was this ever the
 > case? Or is it just a similarity.

JavaScript is the Netscape scripting language; JScript the Microsoft; 
ActionScript the Flash scripting language... their common logic and 
syntax are documented as ECMAScript. Flash's scripting predates the 
ECMAScript specification, but each version has narrowed the gap between 
existing deployments and the preferred universal syntax. Now the 
ECMAScript committee includes Macromedia/Adobe staffers. In the current 
Players you'll find that logical syntax and abstract data structures are 
pretty much the same as the scripting engines in browsers, even though 
the types of objects they're manipulating are quite different.

The 8.5 Player, now in public alpha, includes ECMAScript for XML 
abilities, and will be a nice way to provide easier XML parsing for 
audiences in diverse browsers.

 > If anyone can point me to any online games that use Flash that
 > allow concurrent connections of many users, kind of like an
 > rpg, that would be helpful for me to see.

I'm still not sure of this -- the common question would be whether your 
Ruby/mySQL implementation could handle all the Flash-enhanced audience 
members out there. For "concurrent connections" and "flash" in the same 
sentence, we'd probably be talking about something like the Flash Media 
Server, the Breeze Presentation Server, and of the various chat servers, 
etc... this sounds different from what you're planning, though...?

(Multiplayer games in SWF are legion, but a good match depends on that 
being sought.)


John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.

More information about the thelist mailing list