Flash CS3 Components in a Flex ActionScript Project

I am a bottleneck at work. It’s made worse by the fact that 30% of my day is spent coding. The rest is working with co-workers on implementation details for projects and working project managers on time estimations & resource allocations. So, even the 30% of my day that I do get to code is fraught with distractions. Telecommuting has helped some since those days, I can focus more, but not much.

The business reasons and the history behind them are varied, but suffice it to say we’ve made a concerted effort to convert & create all new media players in ActionScript 3 at work. The biggest problem since day 1 has been an appropriate component set. The Flex ones won’t work since they are too big. You cannot make an 800k Flex SWF any smaller. Modules don’t help because the user still has to download them once. The users probably won’t return anytime soon, but even if they did, that first time experience is negative. Secondly, player caching in doesn’t help because SOMEONE has to initiate the first downloading of the Flex SDK in the first case.

Yet, we’re a company of programmers, so we made the decision to go full throttle on supporting only AS3. The existing ActionScript 3 components out there all fall short on some need whether that be an API not consistent with the Flex SDK, not enough components, no source code, or too high-level. So, I started to convert my Shuriken Flash Lite components to AS3 with an overhaul on the base classes to make them more inline with how Flex’s UIComponent works.

The last battle was what compiler to use. Clearly mxmlc is superior to Flash’s for the type of work we do. For everything else, we can compile in Flash as an SWC or use mxmlc’ Embed meta tag to a Flash created SWF.

Then, 2 weeks ago, I realized that if we kept up with our current pace of creating our own components, in 3 months we’d have 60% of what the Flash CS3 ones already provide. Granted, we wouldn’t have all the finalized components, nor the QA, but we WOULD have most of the base classes. Since our business currently drives us to a custom client GUI route, we cannot effectively code gen a lot of the media players our clients want… at least not the big custom jobs which tend to eat all our resources. I believe in the future there may be a hybrid solution, but for now, we’re doing design agency type work as a service, yet we’re writing the code for longer term maintenance.

After some quick searches and tests, getting Flash CS3 components to be usable in FlexBuilder in an ActionScript Project was cake. Drag component to stage, right click, export SWC, and use SWC in FlexBuilder. Um, that’s damn easy. Furthermore, sequestering custom skinned SWC’s with each project implementation allows differing designs.

I know they won’t provide all the functionality we need (List’s variable row height == fail), but it’s a lot easier to monkey patch Flash CS3 components than it is the Flex ones. You get all the source code so it makes building atop and modifying them a ton easier, just like Flex components do. If we had 3 guys spending all their time building a component set specifically for our needs (small file size, minimalist styling, battle tested set of base classes to build from), then we could continue re-inventing the wheel for a positive cause.

We don’t, Flash CS3 ones work, their pain and suffering with solutions is documented in Google, and it’ll remove me as a bottleneck. Besides, it’s the least risk decision with the most positive benefits. I will say, though, some of the Jump Eye and Flash Loaded components look extremely tempting to just purchase and be done with it.

Flex 5 wish list: A smaller file size component set.

2 Replies to “Flash CS3 Components in a Flex ActionScript Project”

Comments are closed.