Microsoft Prefers Flash to Silverlight

May 10th, 2008 – 12:43 pm
Tagged as: Flash, Adobe, Silverlight

This put a smile on my face…

…however, It’s no surprise to me. I had attended the Microsoft Expressions Session 07 event in San Fransisco a while back, when they were giving out early promotions of their software. In the presentation, they had expressed that Silverlight player, although requiring a separate plug-in, was completely free and equally available as Flash player, which made it equally compelling as an alternative platform to Flash. Of course, anyone who’s worked with front-end technologies for a consulting firm would know that this difference is negligible. The most crucial variable to consider here is not how easy it is to obtain the plug-in, but rather, how many people already have the plug-in installed. I’ve worked with many clients that are afraid of anything that has a market penetration less than 95%, which in itself is frustrating when it requires me to trail behind the latest Flash technology.

Market penetration is the name of the game, and Flash has an 11 year head start.

Reducing Filesizes Using Abstraction

April 23rd, 2008 – 6:27 pm

I had recently came across a situation with a project of mine where concrete referencing resulted in a SWF file that was far more bloated than it clearly should have been. Yet another reason why abstraction is so great — although perhaps it should have been obvious in the first place.
The project in question revolves around an MVC architecture, where multiple distinct view/controller pairs share a common model. The pairs were completely independent from each other with the exception of said model, and each were relatively expensive to instantiate. Because of this, I decided to compile each pair into separate module SWFs that would be loaded into a single wrapper SWF. In addition to loading, the wrapper would also create the model and pass it into all of the modules.

I soon realized the wrapper SWF had become 160KB in size…
Clearly, something was wrong, so I investigated. (more…)

Flash vCam AS3

March 31st, 2008 – 2:17 pm

While motion tweens really aren’t my thing, let alone Flash design in general, I was quite intrigued by the vCam AS3 tool by Brian Heisey. The tool was originally released in 2005 by Sham Bhangal and Dave Dixon, and Brian updated it to function in AS3 with a few additional effects as well. Best of all, it’s free.

Anyway, click the link above to see it in action!

Advanced String Splitting

March 4th, 2008 – 1:08 pm

I recently had a project where I had to run some fancy regex and recursion on strings written as excel-style formulas. It was an enjoyable project, as I don't often have the opportunity to use regex or recursion in Flex. However, one of the steps in the process required me to perform what, I thought, should have been a relatively simple task: Take a string of values and separate them by a comma delimiter.

Under normal circumstances, the solution should be as simple as:

Actionscript:
  1. var arr:Array = str.split(",");

However, this failed to account for nested delimiters. For example, A,B,(C,D) would split into A B (C D), instead of the more desired result of A B (C,D). Standard string manipulation indiscriminately splits regardless of the existence of parenthesis, or any grouping operators for that matter. (more...)

Hot Key System for Flex (pre-release)

February 16th, 2008 – 8:37 pm

After having a need for creating hot key shortcuts on multiple different occasions, I decided to break down and create a highly-reusable system that integrates seamlessly into any Flex app. I spent some time and planned out several different use-cases that the system will need to account for. A few considerations were as follows:

  1. Don't observe hot keys when typing in a text field.
  2. Group multiple hot keys such that they can be collectively prioritized or enabled/disabled (this is especially crucial for modal popups).
  3. Implement easy-to-use behavior to common components.
  4. Keep references weak.

I'm quite satisfied with the results so far, and feel confident that my system will be adaptable to these use-cases and more. Nonetheless, I'd like to push out a pre-release for other developers to test and play with (and perhaps give me feedback as well).

The formal release for the hot key system will include more thorough documentation and meta-data tags for Flex Builder.

Hot Key Demonstration
Source Files

 UPDATE: It's been brought to my attention that the CTRL buttons aren't working for people, and I'm pretty sure it has to do with differences between Mac and PC (it's only working for Mac right now). Apparently keycodes output different values via different OSes, so I'll probably have to switch over to charcode.  I'll explore this further...

Using Gmail’s spam filter for your POP3 account

February 6th, 2008 – 11:33 am
Tagged as: Productivity

Here's a technique I learned a few months back that I've been meaning to blog about. I've always been displeased by my client's spam detection, as it was always either of two extremes: ignoring spam or marking legitimate mail as spam. From my experience, Gmail has always provided the most reliable spam filtering, and it was right around this time that I discovered a way to utilize it. The steps involved vary depending on what your mailserver supports, so I've listed two different solutions: (more...)

The “NEW” way to resize images

February 4th, 2008 – 2:04 am
Tagged as: Flash, Flex 2, Media

A friend of mine just introduced me to an interesting approach to image resizing called seam carving. It's a solution to the challenge of preserving both the size and composition of an image, and well....perhaps this video will explain it better than I could.

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

It also turns out that someone built an RIA that imitates this application, which you can check out for free here:
http://rsizr.com/

Rsizr is also planning to release a Flash app that can present any image on your site with the scalability demonstrated in the seam carving presentation (although from my experience, it might not run quite as smoothly).

Sorry for the Delays…

January 25th, 2008 – 1:11 am
Tagged as: General

Hey guys, sorry about the lack of updates and responses for those of you genuinely interested (my spam is starting to get a little out of control). I'll be doing a bit of an overhaul now that I've become self-employed. Well...hopefully, anyway...I've been finding myself even more busy now than when I was working full-time!

Anyway, for some news...

My blog has just been added to the Macromedia XML News Aggregator, which means I'm going to have to start creating actual content for this page again. Yep...aside from that and the self-employed details, that's pretty much it for the news here. Stay tuned for more posts! :]

FileReference doesn’t work in Leopard

November 17th, 2007 – 9:16 pm
Tagged as: General, Flash

This one set me back a little while. I was trying to set up fileReference for uploading images, but the Event.SELECT handler just wouldn't catch anything. As it turned out, both select and cancel buttons in the browser dialog were dispatching Event.CANCEL events. A little research revealed to me that this was actually a (rather significant) bug with the new Leopard OS + Flash 9 Player. Basically, if you upgrade your Mac to Leopard, you will not be able to utilize any upload or download feature on a Flash-driven site.

This is a little disconcerting, to say the least, but it has been brought to Adobe's attention and will be resolved by the next player update.

In the meantime, how do us Mac-savvy developers cope with this? Here's my solution:

  1. Go here.
  2. Check the box under the terms of use.
  3. Scroll down to the recent nightly builds of the Flex 3 SDK.
  4. Download the latest one.
  5. Unzip the file, and navigate to runtimes > player > mac.
  6. Open the Install Flash Player 9 UB.dmg and run the installer.

This will correct that issue for both the standard and debugger players.

Code-Behind: Flex

August 15th, 2007 – 8:56 pm
Tagged as: Flex 2

In this article, I'll be going in-depth on the practice known as code-behind for the Flex environment. This is a very powerful technique that all software architects should be familiar with, as it promotes sophisticated encapsulation techniques to separate the form and function from within a UI element. (more...)