Custom Brushes with ActionScript

// January 10th, 2010 // Experiments, Source code & tutorials

I saw them on the Interwebs, but how did they do it?

I tried it with “BitmapFilling” a stroke of triangles…


actionscript brushes

» View the brushes

Source code: BruschTest_src ( It’s a mess! )

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

6 Responses to “Custom Brushes with ActionScript”

  1. Really nice! The only thing I find weird is the shrinking of the line’s start on mouse-move. Is that on purpose ?

  2. kris says:

    Brush 1 and 4 are stretching a bitmap over the whole line (2 and 3 are repeating) You can see that more clear with brush 4 if you draw slow. The start of the bitmap is a point, that’s why you have that effect. :)

  3. Aah, I see now. (Didn’t even notice the other 3 brushes at first :$)

    Great job! Really fun to play with :)

  4. RC-1290'Dreadnought' says:

    Why don’t you just copy the pixels of the brush in its current position, with its current orientation, into one bitmapData, every frame? That way you don’t get the weird stretching.

  5. kris says:

    Hi RC_1290,
    In most cases you want to Bitmapdata.draw() your line every frame, like you say.
    But the point is that you also can stretch a bitmap over the whole line :)

  6. Matt Baker says:

    Really great effects, very inspirational! Thanks for sharing!

Leave a Reply