Archive for the ‘Flash/Flex’ Category

Embedding fonts in an ActionScript Project

Thursday, June 18th, 2009

Working with ActionScript projects can offer some rather interesting challenges with some of the most basic parts of Flash development. Things like preloading your application and using linked MovieClips from a library, not to mention using embedded fonts in your TextFields. This really becomes interesting when you want to use more than one font in a single TextField. And sure you can embed font files right into the AS class, but that doesn’t always work. I’ve had numerous issues with OTF fonts.

The method that I have had the best success with is using the same technique as embedding symbols from Flash AS2 swfs. Here’s a step-by-step on how to do this.
(more…)

Recording and streaming video with FMS, Flex and AS3

Thursday, May 21st, 2009

For some reason all of the code examples for using FMS are in AS2. Converting the examples to AS3 can be a bit challenging, especially since there is one really key piece of information that is left out that is new to AS3 and specific to the use of FMS2. The problem is the that FMS2 only supports AMF0, but in AS3 the default setting for the NetConnection class’ defaultObjectEncoding property is AMF3. Without changing this setting to AMF0, your code will seem to be correct, but will fail to connect without really telling you why. Check out the class that I created from the Adobe example and the MXML to use it.
(more…)

Flex and Flash play nice with DisplayObjectWrapper

Friday, December 12th, 2008

If you’re a Flash developer making the switch to start using Flex, then this class from Grant Skinner is for you. DisplayObjectWrapper makes life much easier by enabling developers to easily get anything that inherits from DisplayObject (Sprite, Loader and Bitmap to name a few) to become a display child of a Flex container (Canvas, ViewStack, Accordion, etc). Awesome, now here are some code examples of how to work with SWFs in Flex.

This mxml code example shows how to:
- load a Flash 9/10 SWF
- call a method within the document class of the SWF
- receive an event from the loaded SWF
(more…)

Remoting with Flex and WebOrb

Wednesday, August 20th, 2008

Remoting is one of the coolest ways to get data from your server-side services or destinations as they are know in ActionScript. We recently used WebOrb on a project and it was was unbelievably easy to set-up and works great. In comparison to AMFPHP , it was considerably easier to set-up, required no modification to my PHP classes and has a very similar set-up to that of FDS. I found the documentation somewhat light, although the Quick Start guide was very helpful.

So, what really made me choose WebOrb over AMFPHP? There are several reasons, but mainly the fact that it supports multiple programming languages and is upgradeable to include FDS comparable features for languages other than JAVA. Also they offer professional paid support, which can make a huge difference when deploying a large application for an important client and offer security features and a handy management console with the professional version. The final factor was that I found some good recommendations for its usage on sites that I respect and trust.

[update 10/14/08]
Adobe has opened up Flash Remoting (aka BlaszeDS) and the AMF protocol. Thanks Adobe!

Testing Flash and Flex Applications

Tuesday, July 29th, 2008

I was on a call today with a client and their hosting vendor discussing the finer technical points of a new Flex/Flash project that we are working on and the topic of load testing came up. The hosting vendor talked about load testing Flash as if it was something that was always done. I never really gave it much thought before, normally I would just load test the server-side services and any other code that my Flash/Flex applications would connect to and figured that was all that could be done.

Besides, does load testing even apply to code running in a browser? Where does the load come from if there is only one user? Where I work we would call this monkey clicking if anything. Monkey clicking is when the user clicks much faster than the developer would expect them to. Most sites built with Flash can be broken this way and is considered by my team the pinnacle of ActionScript development – to have a site that can survive monkey clicking. So what are all the ways that a Flash/Flex applications can be tested?
(more…)