FWA winner, Adobe Site of the Day winner and Creative Showcase runner-up.
A common oversight in Flash projects, when using a Bitmap with loaded content is that Flash will revert a Bitmap’s smoothing parameter to false when you replace its bitmapData. That is, when the data loads into the Bitmap, anti-aliasing will get turned off. This is simple enough to fix, but since you may not know if someone is going to replace the bitmapData of a Bitmap you have created – then it’s much better to code defensively for it.
This little SmoothBitmap class is for just such an occasion. Instantiate it like a regular Bitmap and, no matter what another developer does with it, smooth, anti aliased pixels when scaling/rotating will be ensured. Enjoy 🙂
Winning two DMA awards back in 2009, I thought I’d give a quick insight into how the animation effects in this piece were achieved.
I worked with Scott Bedford on this site for Carlson Marketing, for the Lurpak ‘Breakfast’ campaign. I created all the animation prototypes for the various effects used throughout the site, some of which can be seen here. I’m most proud of the crumbs animation and the code-generated interactive steam effect – as you’ll see in the video below.
If you’re still churning out Flash banners, please use this!
I created this simple utility, called SWFIdle, to enable the Flash Player to lower its CPU usage while the user is not interacting with it. Since it’s possible to have multiple Flash instances embedded in one page (for example, a game and a couple of banners), I recommend using this in your projects, so that Flash instances needn’t fight for CPU and give Flash a worse name than it has already 😉
I know there’s the hasPriority embed attribute now. But:
- That assumes you have access to the HTML that embeds your SWF
- If no other players are present, it has no effect
- There’s still usually little reason to be running your SWF at a high framerate if the user isn’t interacting with it
- Flash banners with wastefully unoptimised drawing routines are probably one of the key reasons that Flash got poo-pooed off of mobile platforms and disabled on everyone’s laptops – CPU usage = battery usage!
At the risk of getting sucked into the Apple vs Adobe shitstorm, my own response to Apple chosing to block Flash content from their mobile devices is to at least tell users why – because Apple left it at the rather obscure blue lego block, with no explanation (great experiential design guys). Simply include this code in your page/s to redirect mobile safari users to a page of your chosing …I direct them here.