|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Two ways of using Flash Actionscript to make a rounded oval shape similar to the dark blue one on the top of this forum.
You could work out all the co-ordinates to make the outline complete the shape, this will take a bit of pen and paper work, and maybe an hour or so to figure out.
function round_rectangle(width,height,x,y){
this.createEmptyMovieClip("round_rectangle_mc",-1); round_rectangle_mc.lineStyle(1,0x000000,0); // invisible
h=height/2;
i=x+h;
j=x+width-h;
k=y-h;
l=y+h;
w=x+width;
round_rectangle_mc.beginFill(0xOOOOFF,100);
round_rectangle_mc.moveTo(x,y);
round_rectangle_mc.curveTo(x,l,i,l);
round_rectangle_mc.lineTo(j,l);
round_rectangle_mc.curveTo(w,l,w,y);
round_rectangle_mc.curveTo(w,k,j,k);
round_rectangle_mc.lineTo(i,k);
round_rectangle_mc.curveTo(x,k,x,y);
round_rectangle_mc.endFill();
}
Or you could just draw one fat line  (lines in Flash have rounded ends anyway), this takes about three months to think of and about five minutes to produce.
var roundRect:MovieClip = this.createEmptyMovieClip("round_rectangle_mc",-1);
round_rectangle_mc.lineStyle(34,0xOOOOFF,33);
round_rectangle_mc.moveTo(30,30);
round_rectangle_mc.lineTo(678,30);
|
|
|
| |
|
|
|
 |