Tuesday, September 23, 2008

Flash rather than Processing?

I'm now wondering whether Processing was a bad choice for visualizing missing methods (though it's still better than the horribly slow Google Maps implementation). It results in Java applets, which can take quite some time to load on a page (see other general criticisms here). I had to do some hacky things (use Java code rather than stuff built into Processing) to get the applet to talk to Javascript on the page to find what items a user wants to examine, which might not be stable as Processing develops [and it probably prevents me from just converting to Processing.js or the like]. Also, on the stable site (http://www.treetapper.org, rather than http://treetapper.nescent.org), the existing Java applet I made doesn't work (to see a working version, go here). I've tried playing with the code (changing it to point to the stable site, of course, and looking at other potential issues) and it still doesn't work. Flash animations seem to work much faster and more stably across many browsers. Some versions (>4.0.5, <5.3.0) create Flash animations (the code's been moved into a separate install for later versions of PHP), so I could use that. I could just code it in ActionScript and somehow compile it. Either way, I don't know anything about coding Flash animations, how they can connect to the database and page elements, how to write them without depending on expensive software, etc., so it'd mean a bit of work to learn a new language. Any ideas?

1 comment:

mb said...


Since you have experience with C, you may find the Ming library (http://www.libming.org/) useful.

From the homepage:
"Ming is a library for generating Macromedia Flash files (.swf), written in C, and includes useful utilities for working with .swf files."

It's also available as a PHP module (http://us.php.net/ming), so you could experiment with it if the module is installed.

Whoops! I just saw that you were already linking to Ming. My bad.

Here are some links about connecting Flash to databases. Maybe they'll get you started.

Adobe's Flash Developer Center - Data integration

Peachpit Book Excerpt Getting Dynamic Data into Macromedia Flash

Adobe Technote tn_14482 Overview of Macromedia Flash and database integration

After thinking about it some more, it sounds like you really want to create data driven flash movies. So here's some links that deal with that subject:

Building data driven Flash movies

The Flash DB Server side Scripting and Database Support Forums have a lot of good info. The first two [listed below] are probably the best chance for you to get relevant information.

"PHP, Perl, ASP, JSP, CFM - Server-Side Scripting. Questions on integrating server side scripts with Flash."

"MySQL, PostgreSQL, MS SQL, Access - Flash and Database integration, plus general database questions and answers."

Hope those help