Kaspersky
06-21-2008, 04:52 PM
this.createEmptyMovieClip("line_mc", 1);
with(line_mc){
lineStyle(5, 0x000000, 50, true, "normal", "square", "miter", 1);
moveTo(0, 0);
lineTo(150, 0);
_x=100;
_y=150;
}
By using the lineStyle() we tell Flash that we are going to draw a line, but of course that's not the only thing we tell Flash to do.
There are 8 parameters in this method. The first is the thickness. The second is the color in hex format. The third is the transparency. The fourth is the pixelHinting on/off which improves the rendering of the stroke on some situations. Normal is used for scaling. Other values are none, horizontal, and vertical. It influences the way the stroke reacts to scaling. Square is a value used to specify how the end of the stroke should be rendered, other values are round, and none. Miter is a value used to render the stroke joints. Other values are round, and bevel. Finally 1 is a value that applys only if the preceding parameter is set to miter. The value is used to cut off the angle of the joint. (Note: if the thickness is set to 1, the five last parameters will have no effects on the line created)
with(line_mc){
lineStyle(5, 0x000000, 50, true, "normal", "square", "miter", 1);
moveTo(0, 0);
lineTo(150, 0);
_x=100;
_y=150;
}
By using the lineStyle() we tell Flash that we are going to draw a line, but of course that's not the only thing we tell Flash to do.
There are 8 parameters in this method. The first is the thickness. The second is the color in hex format. The third is the transparency. The fourth is the pixelHinting on/off which improves the rendering of the stroke on some situations. Normal is used for scaling. Other values are none, horizontal, and vertical. It influences the way the stroke reacts to scaling. Square is a value used to specify how the end of the stroke should be rendered, other values are round, and none. Miter is a value used to render the stroke joints. Other values are round, and bevel. Finally 1 is a value that applys only if the preceding parameter is set to miter. The value is used to cut off the angle of the joint. (Note: if the thickness is set to 1, the five last parameters will have no effects on the line created)