-
changing line thickness?
Hello All,
for the following code as an example;
this.createEmptyMovieClip("triangle_mc", 1);
triangle_mc.lineStyle(5, 0xFF00FF, 100);
triangle_mc.moveTo(200, 200);
triangle_mc.lineTo(300, 300);
triangle_mc.lineTo(100, 300);
triangle_mc.lineTo(200, 200);
If the thickness of line(sides of the triangle here) is to be changed, e.g. 10 instead of 5; is there any way to do that, in AS2.0, without having to use the "lineStyl()" and re-drawing the triangle again?
Thanks for your time!
Regards
-
.
Hi,
Apparently not from what I was reading earlier, can't find the page again to show you.
but you can do it with a loop sort of thing, ish.
PHP Code:
var arg:Number = 1;
lineSize();
function lineSize():Void
{
trace(arg);
this.createEmptyMovieClip("triangle_mc",1);
triangle_mc.lineStyle(arg,0xFF00FF,100);
triangle_mc.moveTo(200,200);
triangle_mc.lineTo(300,300);
triangle_mc.lineTo(100,300);
triangle_mc.lineTo(200,200);
arg += 1;
if (arg > 15)
{
clearInterval(continual);
}
}
var continual:Number = setInterval(lineSize, 1000);
-
Thank you!
//
DrawTriangle(10, "0xFF00FF", 100);
//
function DrawTriangle(thickness:Number, colour:String, alpha:Number):Void {
this.createEmptyMovieClip("triangle_mc", 1);
triangle_mc.lineStyle(thickness, colour, alpha);
triangle_mc.moveTo(200, 200);
triangle_mc.lineTo(300, 300);
triangle_mc.lineTo(100, 300);
triangle_mc.lineTo(200, 200);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|