Back to Latest Articles > Viewing Category: Flash

10/11/2010 9:02:48 PM
Flash and HTML5: Best Friends Forever?

Author: Joe Hakooz    Category: Flash
Image from www.piehead.com
Over the past few months I've paid very close attention to the much hyped debate between Flash and HTML5. Of course I had an initial bias in the debate, as did almost everyone involved, but there comes a time when you need to be objective and learn both sides of the story.

Now that I've spent time getting up to speed on HTML5, I thought I would clear up a few misconceptions which have been largely ignored...

Summary of New HTML5 Features - The Good
  • Structure Tags - HTML5 proposes many new "structure" related tags. Seemingly designed with bloggers in mind, we soon can enjoy cleaner markup using the Section, Header, Article, Navigation, and Footer tags.  
  • Input Types - New form input types include: Placeholder Text for text fields, Email Address, Number (stepper), Number (slider), Search Boxes, and Color Pickers. All of these new inputs will make standard form development much easier and less dependent on JavaScript. 
  • Canvas Element - The Canvas allows developers to draw shapes, animations, images, and other visual elements using a drawing API. 
  • Video Tag - This is the big bad Flash killer we've heard so much about. Keep reading to learn more about the "future of video".
  • Geolocation API - As the name implies, this allows the end user, with their permission, to share current GPS coordinates for location based applications. 
  • Super Cookie - Browser storage is about to get a big upgrade from the current ~10kb cookie limit.
  • Offline Caching - Developers will be able to take advantage of a manifest file allowing applications to continue working while the user is offline.
Sure there are many more features, but these are some of the most exciting I've come across. 

HTML5 Features - The Bad
  • Is HTML5 Ready? - W3C is nearing the HTML5 final draft stage. Although already overdue, I've heard the final draft will be ready anywhere from a few months to a few years. The final recommendation isn't due until 2022. Typically browser makers really begin cranking once the final draft is ready, so we could begin to see widespread HTML5 support as early as 2012, but maybe much later. 
  • Browser Compatibility - Browser makers ultimately decide which features to support. And if we have learned anything from history, don't expect them to agree on everything. We already know that some browsers will allow canvas radial gradient fills, while others will not. Designers will love that! There are many other disagreements among browser makers, most notably the video format standoff. (keep reading...)
  • Feature Detection - From what I have read, your HTML5 code will need to be littered with feature detection JavaScript. Fortunately there is a Javascript library called Modernizr that will help you out, but then you need to decide what to do if a browser does not support your code! 
  • Security Limbo - The aforementioned "Super Cookie" has already been criticized as a major potential security risk, and security paranoia has caused the W3C to eliminate critical features such as fullscreen video support. The thought is that a "well crafted video" could be used, in fullscreen mode, to trick users into providing passwords, etc... What they apparently don't know is that several years ago Flash overcame this issue by 1) requiring a user mouse click to activate fullscreen, 2) showing a mandatory notification to the end user when entering fullscreen, and 3) disallowing textbox support while in fullscreen.
Now let's look at the elephant in the room... Flash vs. HTML5

HTML5 Canvas vs. Flash
The Canvas Element has been widely accepted by the press as a Flash animation replacement. The Canvas drawing API does resemble Flash's drawing class allowing both technologies to programmatically create lines, fills, images, and other visuals. Setting aside the possible lack of Canvas compatibility across major browsers, Flash contains dozens of other graphic classes that HTML5 simply doesn't have. It is not realistic to expect HTML5 to hang with Flash as an advanced animation tool. 

HTML5 Video vs. Flash
According to "HTML5 Up and Running", by Mark Pilgrim, there are several factors to consider when using HTML5 video...
  • A video should be encoded into three (or more) formats to be viewed on most major HTML5 compatible browsers: Ogg, WebM, and MP4. This is subject to change due to uncertainty in the browser community. 
  • A Flash based "fallback player" should be included while HTML5 gains popularity. 
  • Fullscreen playback is not supported among other features. 
  • DRM is not supported.
  • iPad currently has a bug with the video "source" tag.
Here are the steps required to provide a professional HTML5 video experience...
  1. Encode your video three times into the above mentioned formats.
  2. Add video tag markup to the page.
  3. Include one source tag for each of the three videos you encoded. 
    1. Due to the iPad bug, the MP4 must be listed first.
  4. Include code to embed a Flash video player if the HTML5 video tag is not supported. 
As you can see, there are quite a few more steps involved when using HTML5 video instead of Flash. You will also need additional storage space, and possibly more bandwidth since MP4s are arguably smaller in file size than comparable Ogg and WebM videos. 

In Conclusion
HTML5 has much to offer. It will even be a good Flash substitute for simple animations and simple video players. But the reality is that Flash is absolutely in a different league. Flash has always been considered a compliment to HTML providing functionality and cross browser compatibility where HTML fell short. I think that type of relationship will continue with Flash and HTML5.

 

12/16/2009 8:05:00 PM
Flash CS5 Preview

Author: Joe Hakooz    Category: Flash

Just a quick post to let you all know that Lee Brimelow has released a new video (over 30 minutes) showing many of the new features we can expect in Flash CS5. As I mentioned before, Flash development will change greatly with the new "Export to iPhone" feature, but that just looks like the beginning. Make sure to check out Lee's video.

Here are a few notable features...

  • Several new video playback skins
  • Video playback during design time
  • Add AS cuepoints at design time... Finally!
  • New font embedding panel. Manage all embedded fonts in one place.
  • XFL Format... The future FLA? This is pretty huge!
  • SWF history property let's you track file size changes in each SWF export.
  • Code snippets panel. Create your own and Adobe presets.
  • Code hinting!!! Even for third party or custom classes.
  • Workflow between Flash Pro and Flash Builder (previously Flex) has been improved.
  • Deco Tool... Not sure about this thing but apparently it's been improved from CS4.
  • SWFObject is finally the default embed script.
  • Text Layout Framework (TLF). This revolutionizes text in the Flash environment and is way overdue!

So there you have it. Flash CS5 looks very promising and I hope you make the time to see Lee's entire video.

 

11/10/2009 12:54:51 PM
Disable Focus Rectangle in AS3

Author: Joe Hakooz    Category: Flash

Just a quick post here...

Even though accessibility is a good thing and we should always try to include it in our applications, there comes a time when you just need to get rid of the yellow FocusRect box in Flash. One of my AS3 projects, currently in development, needed this quick fix and I found it surprisingly hard to find an answer online. The solution is crazy simple...

stage.stageFocusRect = false;

Just add that one line of code and no more FocusRect in AS3!

 

10/5/2009 4:22:52 PM
First Flash Game for iPhone

Author: Joe Hakooz    Category: Flash

Stefan Richter has just released the first ever iPhone game developed entirely in Flash! It's based on the FMS classic Just Letters. I'm helping spread the word and please do the same. It's only $0.99 and will surely show the non Flash world what time it is..! Oh, and don't forget to rate it in the App Store.

For those of you without an iPhone, you can check it out online right here. Imagine, developing an application once and it works on the web and the iPhone...?

But... before you congratulate Apple for finally coming to their senses, it appears that Adobe did most of the work here. That's right, Apple still does not support Flash Player, rather Adobe has added a feature to CS5 that allows you to export to Objective C, the Mac only language used to build iPhone apps. But isn't it nice of Apple to "allow" Adobe and Flash developers to submit these apps to the App Store?

Hopefully since the announcement of Flash Player 10.1, and the adoption of it by many big players in the industry, Apple will once and for all accept the fact that Flash dominates the web and it's in their best interest to support it!  I guess time will tell...

 

 

8/12/2009 6:00:00 PM
Adobe Flash Answers - Just Ask Us

Author: Joe Hakooz    Category: Flash

Lee Brimelow, an Adobe Platform Evangelist, has released a video called Just Ask Us which is 45 minutes jammed packed with answers to many popular Flash community questions.

It's great that Lee is taking the time to answer these questions, many of which have no easily available answer. I suggest you check out the video when you have some time. And here are a few questions and answers that I found interesting...

 

Q: It would be nice to see better HTML support inside Flash...
A: Although you will be able to do a lot more with text formatting, don't hold your breath as far as new HTML support. 

Q: Will there be more keyboard support when in fullscreen mode?
A: AIR already has full keyboard support when in fullscreen. Flash Player 10 will support many "non-printing keys", but there is no plan to support full keyboard access in Flash Player.

Q: Flash Player for iPhone... what's the deal?
A: This one sounds touchy... Lee read an "official" statement from Adobe which I'll paraphrase. "Adobe is bringing Flash Player to a whole host of mobile devices many of which have already received an early version of this Flash Player. The beta will be available to developers later this year. Android, Symbian, Windows Mobile, and the new Palm OS will be among the first to support Flash Player. While iPhone support is currently in development, we need further support from Apple."

It appears that Lee is under a legal iron fist on this one. I however am not and can tell you my humble opinion... Apple currently controls app developement to the point that you MUST use a Mac and you MUST give Apple its' 30% to play in that space. I thought Microsoft was supposed to be the anti-competitive one? The truth is that Flash would immediately dominate iPhone apps which would hurt Apple's app store profits. Once a real iPhone killer shows up, with Flash support, it will do much more damage to Apple financially so suck it up and be cool Apple!

Q: Is Adobe "scared" of HTML 5?
A: HTML 5 is impressive, so Adobe is keeping an eye on it just like they are Silverlight. A future version of AIR will include support for HTML 5, but the problem is the same... HTML depends on browser compliance while Flash does not.

Q: Will there be different Flash Player versions for different devices? TVs, mobile, etc...
A: Eventually, there will be only two players... AIR for stand-alone usage, and Flash Player for browser based usage.

Q: Are there any plans to integrate a real 3D engine into Flash?
A: It would take a while to get to that point, but anything's possible. No real plans at this point though.  

Q: When will AS4 come out?
A: No such thing. Don't worry about it anytime soon.

Q: How do I prepare for mobile Flash development.
A: For starters, get really good at AS3...

There are a ton of other questions, about 58 in all, so head over to Lee's site to see them all...

 

8/6/2009 9:00:00 PM
Flash On Your TV

Author: Joe Hakooz    Category: Flash

Well this isn't breaking news, but some of you may have missed the April announcement that Flash Player will soon be available on TVs, set-top boxes, and Blu-Ray players. Many are expected to start shipping early 2010.

Some are worried that Flash enabled TVs will be abused by content providers introducing a new form of spam, but I'm not so sure about that. 

Flash critics point out that most web ads today are Flash based. Would they prefer ads revert back to the animated GIF seizure inducing format? Ads are not going away so they might as well be slick and, at times, entertaining. The same holds true for TV advertising.

And let's give all of us Flash developers some credit. We did not learn this technology so we could become the greatest "ad-imators" the world has ever known. We want to create cutting-edge applications that push the envelope of user experience.

One of the first apps we'll see is the interactive "TV Guide" with neat little widgets built in, but that's only the beginning. Imagine toggling different camera angles for sporting events, or automatically tracking your favorite TV personalities using facial recognition applications.

I for one am very excited about the possibilities and look forward to learning more...