Smooth, you dynamically loaded JPEG, SMOOTH!!!
A quick blog on Flash optimization, dynamic image smoothing and funny fuzzy critters…
Flash applications and interactive tools can become very file size heavy, unless you know how to optimize properly. Many of the animations and tools we create with Flash incorporate lots of data such as images, text, and video. One option is to pack all this data into the Flash file until everything starts popping out its sides like a gorged Aye-Aye on a grub feeding frenzy.
Or, you can dynamically load the data when it is needed.
Working recently on a couple projects with such dynamically loaded content, I came across an issue in trying to smooth images which were animated and scaled. This can result in aliasing, distortion of the image which looks jagged and ugly. Flash has an odd issue where dynamically loaded images cannot be smoothed on the fly. To solve this, code is added to actually redraw the image in flash once it is loaded and then apply the smoothing. Presto! The image is smoothed and animates with beautiful anti-aliasing applied.
This makes for a much happier Aye-aye who can swing nimbly from tree to tree and grab a grub whenever he needs a quick nibble.