Pie Chart

Well, the search field turned up nothing, and I am baffled. I have spent the last few hours pondering how to make a flash pie chart (only needs one slice that scales according to a variable). The methods I contrived are as follows (impractical):

  • Make 100 or so little pie slice movie clips and use _visible=false/true depending on variable - - TOO CPU INTENSIVE!

  • Make a line mC that rotates according to variable from the starting point - - good, but doesn’t allow for color difference in slices

-Discover an amazing rotational scale property hidden in flash - - perfect.

If anyone can help, please do so.

By the way, I’m doing this for a game as a health indicator. As in Pikmin, if you ever played it.

I hope this helps a little, I just thought I would give it a try since it seemed challenging. I have no clue how I would go about filling this, so if you can do it then go for it. I used a lot of functions I’ve learned from Robert Penners Programming Flash MX book, which I highly recommend. :thumb:

I didn’t do it in that example, but you could easily pass a variable into the array declaration.

edit: wow, i just saw that you wanted this for a game… hmm, what I did might not help you at all for a game =/