I am just getting back into Flash after a long gap and am interested in taking advantage of the new dynamic drawing capabilities of MX.

I have been playing around with some code of Ric Ewing's ( http://www.macromedia.com/devnet/mx/flash/articles/adv_draw_methods.html & http://actionscript-toolbox.com/flashmx_drawingtools.php ) but I have run into what is probably a fundamental misunderstanding of mine when it comes to calling functions/MovieClips.

Given the example below, why does only the C80 circle draw and not both circles?


MovieClip.prototype.drawCircle = function(r, x, y) { this.moveTo(x+r, y); a = Math.tan(22.5 * Math.PI/180); for (var angle = 45; angle<=360; angle += 45) { // endpoint: var endx = r*Math.cos(angle*Math.PI/180); var endy = r*Math.sin(angle*Math.PI/180); // control: // (angle-90 is used to give the correct sign) var cx =endx + r*a*Math.cos((angle-90)*Math.PI/180); var cy =endy + r*a*Math.sin((angle-90)*Math.PI/180); this.curveTo(cx+x, cy+y, endx+x, endy+y); } } var c50 = this.createEmptyMovieClip("c", 1); c50.lineStyle(2, 0x336699, 100); c50.beginFill(0x6699aa, 100); c50.drawCircle(50, 200, 200); c50.endFill();


var c80 = this.createEmptyMovieClip("c", 1); c80.lineStyle(2, 0x996633, 100); c80.beginFill(0xaa9966, 100); c80.drawCircle(80, 10, 10); c80.endFill();

TIA

Phil Gray

I N T E R D E P E N D E N T S O L U T I O N S P / L

Developing Connected Communities

       Phone: +61 2 4751 7204    *    Fax:  +61 2 4751 7205
       Email : [EMAIL PROTECTED]

S y d n e y A u s t r a l i a

visit our website at http://interdependent.com.au



---
You are currently subscribed to fugli as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to