PDA

View Full Version : curveTo to make pie wedges inside a dynamic dial???


boze
05-30-2003, 04:58 PM
i'm going to be working with this open-source flash dial-a-knob (http://www.actionscript.org/movies-results.php?searchTerm=dial) to create a small piece for a client only the knob needs to have two needles which shade the region behind them to a certain color.

curveTo doesn't really do circular curves on it's own so i need to take the data from dial-a-knob and make a dynamic pieshaped fill from the needle to the zero point- at the bottom of the dial's face.

any advice on the curveTo / lineTo - specifically how to make the fraction of the circle on the outside of the pie shaped wedge since the other two are straight lines.

i'm thinking something like that updating onClipEvent should be the way to go, but haven't used curveTo before so if there's a handy tute or movie someplace that'd be great.

the only one i found doesn't even make a circle- it's sort of punked and bloated.

farafiro
05-30-2003, 05:18 PM
there is a tut in the advanced tutorials section for dragging within a curce
I think it would be usefull

boze
05-30-2003, 09:07 PM
are you talking about this tutorial? (http://www.actionscript.org/tutorials/advanced/constrain_to_arc/index.shtml)

i checked that out and didn't think it fit my needs all that well because it's for flash4 and doesn't use curveTo- plus even the math object wasn't present in flash4 right? so anyway- i thought that one was probably thicker than it had to be.

moreover, the dial-a-knob movie works well for the dragging around a circle part- what i need to do is dynamically draw a shaded pie-shaped area from the starting point to the dragged position of the needle on the dial.

thanks for the tip tho..