Actionscript Halftone Effect
![]()
Some of the most satisfying graphical effects are simple in concept and execution. Programmatically creating a half tone-style image from a bitmap (as seen in the blog masthead) turns out to be one of them. I got this right essentially on my first try.
Here’s the class in Actionscript 3. It’s essentially one public method which takes in a bitmap and writes to a sprite. With a few optional parameters. See the source code comment block for the details. I believe it’s pretty well optimized, but would love to see any improvements made to it for speed.
To do: Add the ability to use overlapping colors. Apparently, the dot patterns for additional colors are supposed to be set at different angles from each other — which is less straight-forward, programmatically speaking, than simply setting the ’screen angle’ to 45-degrees, as I’ve done here. Please post any good ideas or improvements to the code below.
Version: 0.9
Licensed under a Creative Commons Attribution 3.0 License.

March 10th, 2008 at 3:12 am
Lee, I’ve been playing about with your halftone class, interesting stuff! I’ve noticed a strange thing there though, when you adjust pointRadius, the whole Sprite scales accordingly. How do you keep the size constant (ie. as in your examples?)
March 30th, 2009 at 3:52 am
Any chance of a AS2 version, or if i had to start on one myself, where do i start?
July 13th, 2009 at 12:24 am
Your demo in the upper right look cool. Could you explain how we can use your AS-Code? Maybe post a sample .fla?
July 13th, 2009 at 2:39 pm
@sdrib, an AS2 version would look almost identical. I’d recommend trying to port it over…