• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Drawing Lines

Flash MX contains a simple set of drawing commands that allow you to create a wide variety of graphics from scratch. You can draw straight lines, curves, and even filled areas.

Drawing Straight Lines

Drawing a line with ActionScript is easy. First, you need to define the line style. The lineStyle command takes three parameters: the line thickness, color, and alpha. The color is expressed as an ActionScript hexadecimal number. So 0x000000 is black, 0xFFFFFF is white, and so on. The alpha parameter determines a line's transparency. A value of 100 makes an opaque line, whereas a value of 50 makes a line that is faded 50 percent, and graphics behind it can be seen.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint