[ see ] [ download ]

_root.attachMovie("squareHandle", "h1", 5);
_root.attachMovie("squareHandle", "h2", 6);
_root.attachMovie("squareHandle", "h3", 7);
_root.attachMovie("squareHandle", "h4", 8);
_root.attachMovie("squareHandle", "h5", 9);
_root.attachMovie("squareHandle", "h6", 10);
_root.attachMovie("squareHandle", "h7", 100);
_root.attachMovie("squareHandle", "h8", 101);
_root.attachMovie("squareHandle", "h9", 102);
_root.attachMovie("squareHandle", "h10", 103);
_root.attachMovie("squareHandle", "h11", 104);
_root.attachMovie("squareHandle", "h12", 105);
_root.attachMovie("squareHandle", "h13", 106);
_root.attachMovie("squareHandle", "h14", 107);
_root.attachMovie("squareHandle", "h15", 108);

_root.attachMovie("squareHandle", "y1", 109);
_root.attachMovie("squareHandle", "y2", 110);
_root.attachMovie("squareHandle", "y3", 111);

_root.attachMovie("squareHandle", "o1", 112);
_root.attachMovie("squareHandle", "o2", 113);
_root.attachMovie("squareHandle", "o3", 114);
_root.attachMovie("squareHandle", "o4", 115);

_root.attachMovie("squareHandle", "u1", 116);
_root.attachMovie("squareHandle", "u2", 117);
_root.attachMovie("squareHandle", "u3", 118);
_root.attachMovie("squareHandle", "u4", 119);

_root.attachMovie("roundHandle", "ctl1", 11);
_root.attachMovie("roundHandle", "ctl2", 12);
_root.attachMovie("roundHandle", "ctl3", 13);
_root.attachMovie("roundHandle", "ctl4", 14);
_root.attachMovie("roundHandle", "ctl5", 15);
_root.attachMovie("roundHandle", "ctl6", 16);
_root.attachMovie("roundHandle", "ctl7", 17);
_root.attachMovie("roundHandle", "ctl8", 18);
_root.attachMovie("roundHandle", "ctl9", 19);
_root.attachMovie("roundHandle", "ctl10", 20);
_root.attachMovie("roundHandle", "ctl11", 21);
_root.attachMovie("roundHandle", "ctl12", 22);

_root.attachMovie("roundHandle", "ctly1", 23);
_root.attachMovie("roundHandle", "ctly2", 24);

_root.attachMovie("roundHandle", "ctlo1", 25);
_root.attachMovie("roundHandle", "ctlo2", 26);
_root.attachMovie("roundHandle", "ctlo3", 27);

_root.attachMovie("roundHandle", "ctlu1", 28);
_root.attachMovie("roundHandle", "ctlu2", 29);
_root.attachMovie("roundHandle", "ctlu3", 30);
//i
h1._x = 80;
h1._y = 170;
h2._x = 50;
h2._y = 275;
ctl1._x = 40;
ctl1._y = 250;
//l
h3._x = 190;
h3._y = 95;
h4._x = 140;
h4._y = 270;
ctl2._x = 155;
ctl2._y = 280;
//o
h5._x = 210;
h5._y = 190;
h6._x = 175;
h6._y = 220;
h7._x = 190;
h7._y = 250;
h8._x = 210;
h8._y = 220;
ctl3._x = 180;
ctl3._y = 190;
ctl4._x = 170;
ctl4._y = 250;
ctl5._x = 210;
ctl5._y = 255;
ctl6._x = 220;
ctl6._y = 200;
//ve
h9._x = 245;
h9._y = 190;
h10._x = 230;
h10._y = 250;
h11._x = 250;
h11._y = 200;
h12._x = 310;
h12._y = 200;
h13._x = 285;
h13._y = 195;
h14._x = 280;
h14._y = 250;
h15._x = 330;
h15._y = 240;
ctl7._x = 210;
ctl7._y = 250;
ctl8._x = 260;
ctl8._y = 235;
ctl9._x = 280;
ctl9._y = 240;
ctl10._x = 295;
ctl10._y = 171;
ctl11._x = 280;
ctl11._y = 225;
ctl12._x = 300;
ctl12._y = 285;
//y
y1._x = 400;
y1._y = 195;
y2._x = 450;
y2._y = 190;
y3._x = 370;
y3._y = 370;
ctly1._x = 412;
ctly1._y = 250;
ctly2._x = 370;
ctly2._y = 350;
//o
o1._x = 470;
o1._y = 200;
o2._x = 500;
o2._y = 210;
o3._x = 470;
o3._y = 250;
o4._x = 485;
o4._y = 200;
ctlo1._x = 485;
ctlo1._y = 185;
ctlo2._x = 510;
ctlo2._y = 250;
ctlo3._x = 450;
ctlo3._y = 225;
//u
u1._x = 515;
u1._y = 185;
u2._x = 525;
u2._y = 235;
u3._x = 550;
u3._y = 190;
u4._x = 580;
u4._y = 220;
ctlu1._x = 500;
ctlu1._y = 210;
ctlu2._x = 555;
ctlu2._y = 245;
ctlu3._x = 560;
ctlu3._y = 255;

// create a clip to draw to
_root.createEmptyMovieClip("mc", 2);
// this function redraws the curve
function draw() {
	mc.clear();
	// set our line style for the handle lines
	mc.lineStyle(0, 0x999999);
	// draw lines based on control handle location
	mc.moveTo(h1._x, h1._y);
	mc.lineTo(ctl1._x, ctl1._y);
	mc.lineTo(h2._x, h2._y);
	
	mc.moveTo(h3._x, h3._y);
	mc.lineTo(ctl2._x, ctl2._y);
	mc.lineTo(h4._x, h4._y);
	
	mc.moveTo(h5._x, h5._y);
	mc.lineTo(ctl3._x, ctl3._y);
	mc.lineTo(h6._x, h6._y);
	mc.lineTo(ctl4._x, ctl4._y);
	mc.lineTo(h7._x, h7._y);
	mc.lineTo(ctl5._x, ctl5._y);
	mc.lineTo(h8._x, h8._y);
	mc.lineTo(ctl6._x, ctl6._y);
	mc.lineTo(h5._x, h5._y);
	
	mc.moveTo(h9._x, h9._y);
	mc.lineTo(ctl7._x, ctl7._y);
	mc.lineTo(h10._x, h10._y);
	mc.lineTo(ctl8._x, ctl8._y);
	mc.lineTo(h11._x, h11._y);
	mc.lineTo(ctl9._x, ctl9._y);
	mc.lineTo(h12._x, h12._y);
	mc.lineTo(ctl10._x, ctl10._y);
	mc.lineTo(h13._x, h13._y);
	mc.lineTo(ctl11._x, ctl11._y);
	mc.lineTo(h14._x, h14._y);
	mc.lineTo(ctl12._x, ctl12._y);
	mc.lineTo(h15._x, h15._y);
	
	mc.moveTo(y1._x, y1._y);
	mc.lineTo(ctly1._x, ctly1._y);
	mc.lineTo(y2._x, y2._y);
	mc.lineTo(ctly2._x, ctly2._y);
	mc.lineTo(y3._x, y3._y);
	
	mc.moveTo(o1._x, o1._y);
	mc.lineTo(ctlo1._x, ctlo1._y);
	mc.lineTo(o2._x, o2._y);
	mc.lineTo(ctlo2._x, ctlo2._y);
	mc.lineTo(o3._x, o3._y);
	mc.lineTo(ctlo3._x, ctlo3._y);
	mc.lineTo(o4._x, o4._y);
	
	mc.moveTo(u1._x, u1._y);
	mc.lineTo(ctlu1._x, ctlu1._y);
	mc.lineTo(u2._x, u2._y);
	mc.lineTo(ctlu2._x, ctlu2._y);
	mc.lineTo(u3._x, u3._y);
	mc.lineTo(ctlu3._x, ctlu3._y);
	mc.lineTo(u4._x, u4._y);
	
	// set the line style for the curve
	mc.lineStyle(7, 0xFF0000);

	mc.moveTo(h1._x, h1._y);
	mc.curveTo(ctl1._x, ctl1._y, h2._x, h2._y);

	mc.moveTo(h3._x, h3._y);
	mc.curveTo(ctl2._x, ctl2._y, h4._x, h4._y);

	mc.moveTo(h5._x, h5._y);
	mc.curveTo(ctl3._x, ctl3._y, h6._x, h6._y);
	mc.curveTo(ctl4._x, ctl4._y, h7._x, h7._y);
	mc.curveTo(ctl5._x, ctl5._y, h8._x, h8._y);
	mc.curveTo(ctl6._x, ctl6._y, h5._x, h5._y);

	mc.moveTo(h9._x, h9._y);
	mc.curveTo(ctl7._x, ctl7._y, h10._x, h10._y);
	mc.curveTo(ctl8._x, ctl8._y, h11._x, h11._y);
	mc.curveTo(ctl9._x, ctl9._y, h12._x, h12._y);
	mc.curveTo(ctl10._x, ctl10._y, h13._x, h13._y);	
	mc.curveTo(ctl11._x, ctl11._y, h14._x, h14._y);
	mc.curveTo(ctl12._x, ctl12._y, h15._x, h15._y);	
	
	mc.moveTo(y1._x, y1._y);
	mc.curveTo(ctly1._x, ctly1._y, y2._x, y2._y);
	mc.curveTo(ctly2._x, ctly2._y, y3._x, y3._y);
	
	mc.moveTo(o1._x, o1._y);
	mc.curveTo(ctlo1._x, ctlo1._y, o2._x, o2._y);
	mc.curveTo(ctlo2._x, ctlo2._y, o3._x, o3._y);
	mc.curveTo(ctlo3._x, ctlo3._y, o4._x, o4._y);

	mc.moveTo(u1._x, u1._y);
	mc.curveTo(ctlu1._x, ctlu1._y, u2._x, u2._y);
	mc.curveTo(ctlu2._x, ctlu2._y, u3._x, u3._y);
	mc.curveTo(ctlu3._x, ctlu3._y, u4._x, u4._y);
}
// call draw every 25 milliseconds
setInterval(draw, 25);