# Pie Chart

**URL:** <https://forum.kirupa.com/t/pie-chart/94184>\
**Category:** Uncategorized\
**Created:** [November 9, 2003, 10:53pm UTC](https://forum.kirupa.com/t/pie-chart/94184 "2003-11-09T22:53:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spike99](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@spike99](https://forum.kirupa.com/u/spike99)\
**Post date:** [November 9, 2003, 10:53pm UTC](https://forum.kirupa.com/t/pie-chart/94184/1 "2003-11-09T22:53:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 10, 2003, 3:00am UTC](https://forum.kirupa.com/t/pie-chart/94184/2 "2003-11-10T03:00:37Z")

</div>

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 =/
