Here's one I just made (and tested) from a draw circle prototype that
then draws another circle in reverse (before the endfill is applied --
necessary to get a cutout):
// r1 = radius of outer circle
// r2 = radius of inner circle (cutout)
// x, y = center of donut
29, 2005 8:16 PM
Subject: Re: [Flashcoders] How to make a doughnut?
How about making the doughnut shape as a movieclip and dynamically
applying it as a mask layer to a gradient filled cirle you create at
run-time? You could even draw the mask layer at run-time instead of
using a pre-drawn one
Solution is quite simple ;-)
Flash drawing / fill methods use XOR logic.
Here's what you want (swf and code):
http://gousable.com/flash/temp/doughnut1.html
frcfc Navneet Behal wrote:
After putting a couple of hours on the problem, I am still in a daze
on how would one go about making a
cut the ring with a 1 pixel line, then it's like a c with a pixel opening.
You could do this with the drawing api, but if the split shows too badly you
might need to patch it
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Navneet
Behal
Sent: Saturday,
flashcoders@chattyfig.figleaf.com
Sent: Saturday, October 29, 2005 7:56 PM
Subject: Re: [Flashcoders] How to make a doughnut?
Here's one I just made (and tested) from a draw circle prototype that then
draws another circle in reverse (before the endfill is applied --
necessary to get a cutout
That's a very long keyword. But yes, that's crucial. I decided to
write it up so I wouldn't forget again that it's only the mask that
requires a reverse cutout:
http://flash-creations.com/notes/dynamic_drawingapi.php#cutout
Helen
Navneet Behal wrote:
Ah.. reading the code again along with
6 matches
Mail list logo