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
shouldn’t. 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.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...