I’ve posted about this in the past, but Michael Tuminello (Sr.Product Marketing Manager, Rich Media) of MediaMind (my employer) wrote an interesting article for Figaro Digital about why the transition to Flash from HTML 5 is bad for the free (ad-supported) internet at the present time.
ActionScript 2.0
Flash is a very interesting environment to develop in. It’s actually the environment I’ve been developing in most of my career at EyeWonder / MediaMind. On a new project I’ve been working on at MediaMind, it required that I develop some new UI features in an ActionScript 2.0 SWF. Due to technology limitations, this couldn’t switch to ActionScript 3.0 (or we would have). I then remembered my hatred of ActionScript 2.0 with a passion.. its lack of proper documentation, or proper type checking, or well.. anything. Good thing I had some code I wrote for EyeWonder back in 2006-2007 (part of AdWonder 8.1.. anyone remember that?) that did something similar, or I would of probably have ripped my eyes out.
Why HTML 5 can’t replace Flash just quite yet…
So Colin Waters thinks that Flash should be deprecated today. I disagree.
Why do you ask? Advertising. Plain and simple. It pays the bills at many websites, and HTML 5 simply isn’t capable of replacing Flash just quite yet in advertising. An ad using a simple animation with maybe some content expansion on mouseover with a video (with audio off by default) has a few technical issues that are easily solved by Flash and not by HTML 5:
1. Not easy for the designer to build, especially with all of the integrated reporting functionality. AdWonder for instance allows the designer to drop a VideoScreen instance onto the Flash stage, and it gets automatic detailed reporting, can use streaming or progressive with a simple change in the backend system, integration with controls by name (all which can report on the interactions and the video they were interacting with)
2. No streaming option for video. It’s expensive for both the hosting provider and the end user for a video to be served over HTTP. RTMP, while costing more per byte, is cheaper, since we don’t have to send the full content file at the user’s burst bandwidth, but instead at a much lower rate of whatever the video is playing at.
3. Browsers strain when dealing with animations currently. The animations used by ads today are normally not all that complex, maybe using of Robert Penner’s easing code, or using a Flash motion tween, but browsers strain with the same content in HTML 5.
4. Typography — no consistent way of specifying a custom font face, especially with a limited set of the character set. With HTML 5, you have to resort to using images. With Flash, it can embed the specific characters of the font you are using.
UPDATE:
5. Accessing content on different domains. And no, the HTML 5 stuff doesn’t work. That requires both sides be able to do this. What if you need to access an XML file from a different domain? Flash can do this by having that different domain provide a crossdomain.xml file granting permission. There’s no equivalent in HTML 5 for this.
Yes, Flash gets some security vulnerabilities every now and then. Then again, so does your browser. Maybe we should deprecate browsers to! Chrome automatically updates Flash for you. Firefox lets you know when your version is outdated. Flash Player has a built in automatic updater.
Flash Player 10.1 LocalConnection performance problems
Performance improvement to ActionScript 3.0
While reading Sean Moore’s blog post on performance improvements to ActionScript 3.0, I decided to chime in on another one that has drastic performance improvements:
In AdWonder, we use SharedObjects to persist local data (settings, local ads, etc..). So when it came time to start optimizing the latest version (9.4) for performance ( a major theme of this release.. faster, easier, smarter ), we noticed that opening the SharedObjects had the biggest drag on performance! Almost 100ms for each instance (this adds up as you can imagine). So, all of you ActionScripters out there, if there’s a SharedObject you are storing data in, open it once, and store the SharedObject instance somewhere to reuse it. You and your users will love you!
Going to Adobe MAX…
I will be at Adobe MAX from November 16th to November 20th. If you want to meet up with me in San Fransico, please let me know!
Built-in Flash Components (like a ComboBox) – Parent and Child SWFs
A co-worker of mine, Erin Coker, posted a very useful read at the Unleash the Wonder Blog
Basically deals with how to properly use MX V2 Components inside child SWFs in a Flash document
ActionScript 3.0: Events for Static Classes
Normally, a static class in ActionScript 3.0 can’t dispatch events, since you can’t inherit from EventDispatcher or implement IEventDispatcher if the functions are a static.
However, with ActionScript 3.0, you can create an EventDispatcher object to do the dispatching for you!
package { import flash.events.EventDispatcher; public class StaticEventDispatcher { public static var eventEngine:EventDispatcher; public static function initialize():void { eventEngine = new EventDispatcher(); } } }