Do you use transparent PNGs in Flash, Flex or AIR? Want to cut your application file size in half? Problem: Embedding transparent PNGs dramatically increases the size of your Flash, Flex and AIR applications. Photoshop and Fireworks dot not have any compression available for transparent PNGs (that I am aware of). Solution: Import your PNGs […]
Paint Algorithm for ActionScript
I bet you can’t fill the canvas with paint using the bad painting algorithm below (keep an eye on the frame rate counter). Now check out your paint skills using the good paint algorithm. What’s the difference? Check out the answer after the examples. Bad Paint: Alternate Page. (pretend your cursor is a paint brush, […]
Image Distortion and Tapering in ActionScript
Distort and taper images in BOTH ActionScript 2 and 3 without a big 3D engine. Is it possible? YES! **Update (12/15/09): Alex Uhlmann made this class even better! Distortion Effects (AS3 only) (06/24/09): After doing some more research I found that Ruben Swieringa re-wrote this same class into AS3 exactly two years ago. I wish […]
Logic != Math: Transparency Example
If you have a 100% alpha red circle how many 10% alpha blue circles does it take to completely cover the red circle? The answer is 10, right? No, wait maybe 20? How about 100? Maybe 1,000? Believe it or not, an infinite number of blue circles are required it’s actually impossible. Give it a […]