Pixelshifting Session

September 24, 2008. Posted by Andy Hulstkamp under Actionscript 3 Flash
Keywords: , , , , ,

Shifting pixels in flash is relaxing. I experimented a bit with turning Type into grains and use these grains to mess around. What came out doesn’t make too much sense in terms of usability. Nevertheless someone might find it useful in a preloader to gain the attention from a user for just a few seconds more. Depending on the settings the effect generates different results:

Football Ground

click here to turn lovely Wembley grass into a 4th division pitch.

 

Investment Bank

click here to see what happened to Lehman, Merrill, Goldman, Morgan et. al.

 

Waterfall

click here for some bubbling pixels.

The code is not too exciting. Basically it takes a textfield to mask a back- and foreground texture on the bitmap level. Then a pointer scans the bitmapData of the foreground. If a pixel has an alpha-value greater than 0 a grain is created while the pixel in the foreground texture is cleared - leaving the background. Grains are painted onto a glass pane (another bitmap) and leave their traces. The glass pane has a ColorMatrixFilter to continuesly fade these traces. If a pixel reaches the ground it is painted back to the foreground and stays there.

here’s the source.



Share/Save/Bookmark

Leave a Reply