Category Archives: Flash

New Site – Angeleno

Angeleno

I just finished up a new site for the Los Angeles lifestyle magazine ‘Angeleno’, working with talented guys at Faction7. I did the Flash front-end for the Features and Scene sections.

The idea was to create a ‘HTML style’ site with simple navigation and a focus on the content. This gives a familiar + intuitive user experience while still allowing some nice Flash flourishes. To allow deep linking and back button support we used SWFAddress. SWFaddress has the benefit of working with Google Analytics, to provide per-page tracking. One issue I found with SWFAddress is that it seems to give a noticeable lag when navigating between pages on Vista/IE7.

The features section includes a full-screen option which really shows off the large format photography. The scene section also includes a user-submitted commenting system which is quite cool (registration required). All content is completely dynamic, powered by a custom PHP CMS. The Flash XML content is written into the HTML pages, to allow for SEO.

One snag we hit was integrating DoubleClick ads. Since DoubleClick still does not support AS3 (!), we had to do some CSS/JS hacking to overlay ads in a HTML div. Hopefully DoubleClick will get this working soon.

New MySpace Video Player

I was recently brought into MySpace to consult on rebuilding their Video Player. The previous version was a bit long in the tooth and was proving difficult to update, so it was decided to re-code from scratch in AS3. I worked on the interaction design and prototyping as well as building out the new AS3 framework.

The new player features flash full-screen mode, a related videos menu, skinning support, ad support, localization support, HD video support, plus the usual sharing features. Kudos to the MySpaceTV team for knocking out a quality product in a short time-frame.

The Dark Knight in HD

Flash Player 10 3D versus Away3D

3d test

One of the most exciting new features of the new Flash Player is the native 3D support. I put together a couple of demos to compare FP10’s 3D performance versus the ‘old-school’ approach, using the Away3D library (I didn’t have time to build a PaperVision example, but I imagine the performance would be similar to the Away3D one).

These demos display video and text on multiple 3D planes. Take a look and see what kind of frame rates you get.

Here are some observations based on the demos:

  • FP10 wins in terms of performance. This make sense when you consider that the 3D math is being handled internally.
  • FP10 wins in terms of SWF size (6k versus 110k). Away3D has to load in all the 3D code externally.
  • FP10 3D has no concept of depth sort. Depth sort must be handled manually. For simple scenes this is trivial, but once you get many polygons intersecting, depth sort can become a complex problem.
  • The FP10 perspective distortion looks a little odd to me. The plane seems to get bigger at the right and bottom of the view.

FP10 offers a very limited subset of the functionality offered by Away3D and PV3D (no cameras, complex objects, collada import etc), but for simple 3D scenes it gives much better performance. In the near future I imagine the PV3D and Away3D teams will incorporate FP10’s native 3D support to give the best of both worlds.

(Thanks to Keith Peters for his minimal components used here.)

AS3 Embedded MovieClip Gotcha

In AS3 you can load an asset from a SWF using the Embed metatag like this:

[as][Embed(source=”Assets.swf”, symbol=”MySymbol”)]
var mcClass:Class;
var myMC:MovieClip = new mcClass();
addChild(myMC);[/as]

Where ‘Assets.swf’ is a swf that contains a symbol with linkage class name ‘MySymbol’. Sometimes when you do this you will get the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert MyClass_mcClass@12510d1 to flash.display.MovieClip.

I finally figured out why: Flash will type the symbol based on the number of frames in it’s timeline. If the symbol has only 1 frame it will be typed as a Sprite, 2 or more frames it will be typed as a MovieClip.

So to fix the above error, just add another frame in your symbol’s timeline. Of course you could type your object as a sprite instead of a movieclip, but there are reasons why you may not want to (for example accessing sub-movieclips, adding dynamic properties etc).

Fixing "Flex Builder requires a more recent version of the Flash Player" Error

If you uncheck “Generate HTML wrapper file” in your Flex Builder Project ActionScript Compiler options (which is good idea if you want to use SWFObject to wrap your SWF rather than the crud that Flex Builder generates), Flex Builder uses the system default application for opening SWFs when you run/debug your project.

If you get the “Flex Builder requires a more recent version of the Flash Player. You might need to install the Flash Player or reinstall Flex Builder.” error, the solution is to set the system default application for opening SWFs to point to the latest debug player. To do this on Windows right click a SWF in explorer. The latest debug player may be in the following location: C:\Program Files\Adobe\Adobe Flash CS3\Players\sa_flashplayer_9_debug.exe, otherwise download the latest Projector content debugger and point to it.

Here is some more Mac specific help

Adobe Go Massive

devices

With the Open Screen Project, Adobe is betting everything on making Flash the world’s number one universal runtime.

They are opening up the SWF specification which will allow anyone to build their own Flash player. They are also removing licensing fees for using Flash on devices. This means loss of revenue in the short term in order to entrench the Flash player on as many devices as possible.

It’s great to see Adobe continue to open up Flash, which makes it more appealing to a broad range of developers. While anyone can now build their own Flash player, Adobe are betting that their version is strong enough to remain the world standard. I guess they plan to make revenue from selling the dev tools to build SWFs.

Techies have always dismissed Flash, because of its origins as a web animation tool. Techies are scared of anything with a timeline. In spite of this, Flash may be able to sneak under the radar to become the world’s most ubiquitous platform, ahead of Java, Silverlight etc. It’s interesting that the web and technology in general is moving towards better designed user experiences, something that Flash has always excelled at.

According to techcruch’s great analysis, Silverlight’s answer to Flash’s increased ubiquity is “Live Mesh”. With good timing, Joel Spolsky just posted a scathing attack on Live Mesh. Frankly I am not at all worried that Silverlight will crush Flash, especially judging by the embarrassing state of their showcase (hello 1998). Maybe MS should just build their own version of flash player.