AS3 Dotted Line Class

Apr 2nd in ActionScript 3.0 Classes by Jay

Here is an ActionScript 3 class I use all the time to draw pixel perfect dotted lines in Flash. Free for any use other than reselling.

PG

Author: Jay

My name is Jay and I’m a freelance Interactive Art Director/Flash Developer from the Washington, DC area.


Enjoy this Post?

We'd love your vote!

User Comments

( ADD YOURS )
  1. PG

    Brian April 2nd

    First!

    ( Reply )
  2. PG

    Brian April 2nd

    And thanks!

    ( Reply )
  3. PG

    Ben April 2nd

    Awesome. By the way, what a great way to separate your functions in your code!

    ( Reply )
  4. PG

    Marvin April 2nd

    very great ;)

    ( Reply )
  5. PG

    Bruno April 3rd

    Very good job ! Very orderly in your work. :)

    ( Reply )
  6. PG

    Diego SA April 28th

    Simple and useful!

    ( Reply )
  7. PG

    Marcelo Casé June 23rd

    Excelent! Thanks man!

    ( Reply )
  8. PG

    dbam September 26th

    Definitely a time-saver, thank You for sharing!
    Allow me two notes though, what i saw after 2 minutes of testing…
    1. in the constructor the “dotAlpha” doesn’t have a type declaration, i used Number, like “dotAlpha:Number = 1″.
    2. the variable “tile” of type BitmapData has a height of “_h +1″, that gave me a one pixel artifact ( occasionally ), changing it to just “_h” gives the desired result…i’m wondering why the +1 though.

    Still, nothing that one wouldn’t notice after using Your class – easy to pin.
    Great share, thanks again Jay!

    ( Reply )
  1. Arrow
    Gravatar

    Your Name
    September 26th