The back end for most of my flash portfolio is using AMFPHP Flash Remoting. It’s a free library that came out years ago. I still like it because its performs well and is easy to install-just edit some configs and upload. It’s been a great journey into PHP/mysql as a back end for AS3, and has allowed me to make several RIA’s (Rich Internet Applications) on my own.
For Flash based apps that use a back end, I like Flash Remoting better than JSON, AJAX, REST services, or server side generated xml. I have an opinion on this because I’ve used all of them. Here’s my reasons:
Flash sends and receives native Flash objects with any level of hierarchy and complexity. For example, an array of objects containing strings, numbers, and other objects containing arrays of objects. This leads to the next point:
No serialization or de-serialization is required, ( the information received is Flash native ). For example, in AS3, you might access your returned data with “response.people.id[7].areaCode“
It’s faster because it’s compressed binary, rather than large uncompressed strings
It’s faster because it’s socket layer communications, rather than standard http requests
Also, for some speed demo on this, see James Ward’s benchmark.
I know that this particular implementation of Flash Remoting might not suit the needs of a large, enterprise based back end – but there are enterprise level remoting solutions out there. Several flavors are available, not only with PHP, and not all opensource. I’ll post some links of these:
An expanded version of the getDirectory call, but also uses the file name as a key to more information in the database. This is useful for describing media such as video, sound, and pictures. It’s part of my MediaService class in AMFPHP.
“getDirectory” is part of my PortfolioService in AMFPHP. It gets the files in a directory and provides info about them such as the name, size, and extension. This information can be read by Flash via Flash Remoting and is received as an array of objects which is binary compressed.
It’s real usefulness is for media viewers (images, sound, video). Once you build a player that uses this service, you can update new songs, videos, etc by simply uploading them to the same folder, and the media is automatically available to the application using the service.
Back in the early 80’s when I was a young teen, my dad bought me my first computer. It was a Commodore 64 sporting a [then] impressive 64K of memory ( compared to 16 million K in a 16GB computer today ). When you powered it on, you saw a command-line / Basic language interpreter. As a result, the first thing I learned was how to program in Basic. And the first program I wrote was generating sound frequencies, like say… 230hz.
For years I was dissapointed that ActionScript never had this ability, until Adobe finally released it in Flash Player 10. Generating raw frequencies is nothing exciting unless you want to annoy someone or their dog, but it’s the building block to something more exciting – synthesizers, drum machines, sequencers, and electronic music. I’ll post some links later of some developers who have taken this to a whole new level.
A video playlist with titles, descriptions, and commenting. Uses my MediaService in AMFPHP to accomplish the back end. Build in Flex 4 using standard components.
Type in and search for cities, addresses, and land marks within Flash
Different views including satellite imagery
Reverse Geo-coding: move the map and the address of where you are displays on the bottom
Added my own interactive layer “Drag Radius”
see it
The task at hand was to build an “Area Selector” in Flash. You could go to an address, drag a highlight over the area, and then get the coordinates and size. Future plans were to hook into databases with coordinate information and extract other data for marketing purposes.
Currently it shows LAT/LONG/area/radius. Adding the area and radius was not easy. It has to account for the zoom level. So, a 1″ radius could be 1/10 sq Mile, or it could span half of the planet, depending on your zoom level. The other feature I added was Reverse Geo-coding. The center point reveals the address of the building underneath (if there is one). Dragging the map more triggers address lookups on each move.
<?xml version="1.0" encoding="UTF-8" ?>
<slideshow date="09/28/2007">
<config>
<transitiontime>2</transitiontime>
<displaytime>5</displaytime>
</config>
<items>
<item>
<src><![CDATA[http://www.actionscriptdude.com/portfolio/content/photoviewer/california/Oxnard/oxnard2.jpg]]></src>
<type>image</type>
<link><![CDATA[http://www.actionscriptdude.com/portfolio/content/photoviewer/california/Oxnard/oxnard2.jpg]]></link>
<text>
<header><![CDATA[beach at Oxnard, CA]]></header>
<description><![CDATA[Just an hour from Los Angeles is a relaxing, uncrowded beach I love to visit.]]></description>
</text>
</item>
<item>
<src><![CDATA[http://www.actionscriptdude.com/portfolio/content/photoviewer/california/Mono%20Lake/tufaSunset.jpg]]></src>
<type>image</type>
<link><![CDATA[http://www.actionscriptdude.com/portfolio/content/photoviewer/california/Mono%20Lake/tufaSunset.jpg]]></link>
<text>
<header><![CDATA[Mono Lake]]></header>
<description><![CDATA[At the East entrance to Yosemite is a magical lake. The Tufa rock formations were once underneath the water level as volcanic springs created these amazing structures.]]></description>
</text>
</item>
your picture gets placed in the Vandal Hall of Fame where people can see it
people can comment on your picture
live preview generation
several communication methods in it’s own “Vandalize Service”
This was a prototype for a FaceBook app, designed by the UX ( User eXperience) designers at speakTECH back in 2007. I created the back end and front end, making it functional based on some nice specs from the team. The back end was it’s own remoting service called “VandalizeService”.