Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.

 

senocular.com ActionScript Library

simpleCurve.as

1
2
3
4
5
6
7
8
9
10
_global.simpleCurve = function(mc, x,y, w,h, centered, lstyle, fstyle){
	// lstyle and fstyle are arrays of lineStyle and beginFill arguments respectively
	if (lstyle) mc.lineStyle.apply(mc, lstyle);
	if (fstyle) mc.beginFill.apply(mc, fstyle);
	mc.moveTo(x, y);
	var cx = x+w, cy = y;
	mc.curveTo(cx, cy, x+w, y+h);
	if (fstyle) mc.endFill();
	return mc;
};