EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 551

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Drawing with ActionScript 551
Setting line alpha
The third parameter in the
lineStyle() method, alpha, lets you control the transparency
(alpha) level for the line. Transparency is a numerical value between 0 and 100, where 0
represents a completely transparent line, and 100 is completely opaque (visible).
Setting line pixel hinting (pixelHinting)
The pixel hinting for strokes parameter,
pixelHinting, means that line and curve anchors are
set on full pixels. The strokes are on full pixels for any stroke thickness, which means that you
never see a blurry vertical or horizontal line. You set the
pixelHinting parameter to a
Boolean value (
true or false).
Setting line scale (noScale)
You set the
noScale parameter by using a String value, which lets you specify a scaling mode
for the line. You can use a nonscaleable stroke in horizontal mode or vertical mode, scale the
line (normal), or use no scaling.
You can use one of four different modes to specify when scaling should occur and when it
shouldnt. The following are the possible values for the
noScale property:
normal Always scale the thickness (default).
vertical Do not scale the thickness if the object is scaled vertically.
horizontal Do not scale the thickness if the object is scaled horizontally.
none Never scale the thickness.
Setting line caps (capsStyle) and joints (jointStyle)
You can set three types of caps styles for the
capsStyle parameter:
round (default)
square
none
The following procedure demonstrates the differences between each of the three caps styles. A
visual representation of each cap style appears on the Stage when you test the SWF file.
TIP
It is useful to enable scaling for user interface elements when users zoom in, but not if a
movie clip is only scaled vertically or horizontally.

Table of Contents

Related product manuals