There are a variety of methods we can use to communicate between flash and our server side web applications, including XML and HTTP POST/GET. However a much more robust methods exists–Action Message Format (AMF). AMF uses binary encoded messages. Because of this the messages are compressed which makes AMF the fastest way to transfer data. Another advantage to using AMF is that we can share objects and methods between Flash and our server technology. This post shows how we can communicate between Flex builder 3 and PHP using AMF. We will be using the Zend framework to accomplish this.
Adobe Flash CS4 has made character animation in Flash a lot easier. The following post shows an example of using Inverse Kinematics and the bone tool to animate a skeleton character.
Firstly we need to divide all of the limbs of the character into movie clips. A photoshop document version of the character can be downloaded here and the flash source file here. In the screenshot below we can see several movie clips denoting different parts of the character.
Papervision 3D is a powerful open source 3D library for Flash. It allows us to create animations and interactive applications in 3D. The current release of Papervision 3D supports Actionscript 3 and can be downloaded here. This post runs through some of the basics of setting up an Actionscript 3 papervision 3D project.
NOTE: Please click here for a HTML DOM version of this technique.
Sometimes it is useful to be able to iterate through our entire display list–or all of the display objects within a specific display object container–and either perform an operation on each object or access a property of each object. We need to use recursion in order to do this because child elements of a display object container may themselves be a display object container. WARNING! It can become quite processor intensive using recursion to iterate through a large number of objects. Below is an Actionscript 3 example which puts this technique into practice. All source files can be downloaded here.
“Augmented Reality” allows us to super impose our own digital art on top of a live video stream.
In the example below we augment a live web camera feed with a 3D animation .
Adobe Flash technology is very useful in the field of variable data publishing. We can embed fonts, dynamically adjust and resize variable elements and apply a large amount of filters and effects to create seamless compositions of both static and dynamic elements.
Below is an interactive demonstration which shows an example of dynamic imaging applied to video footage. Here we dynamically include the following graphic in our video:
Flash applications do not support concurrency. All code must be executed within a single thread. This means that any large calculations or processor intensive tasks will cause the flash player to stall very quickly. We have to rely on server side operations or other technologies to perform large calculations.
Fortunately it is possible to simulate threading using the flash platform. The flex example below demonstrates psuedo-threading using actionscript 3. The sample application increments an integer from zero to one hundred million, displaying the count on the screen as it increments. If this code was executed in a for loop–or even a frame loop–our application would quickly become unresponsive.