Pie Chart
| Category | : Flash | Views | : 15963 | ||
| Version | : 8 | Rating | : | ||
| Type | : Text | Source File | : pie-chart.zip | ||
| Result | : See the result | ||||
You can place labels in your slices to help the user know what a slice means.
On both frames draw a text box and write a label for the slice, try to make it in the same angle of the slice using the Free Transform Tool (Q). Like this:

Create the rest of the slices like the one we just created, but change the sizes and colors.
Give each slice an instance name: "slice1", "slice2", etc.
Now go to the stage and draw a dynamic text box, link to the variable "textSlice".
On the main timeline paste the code:
var textSlice = "":
And on the pie chart paste this code:
//Event
slice1.onRollOver = function()
{
//change the variable that is linked to the text box
_root.textSlice = "This is the Slice1";
}
//other slices events
slice7.onRollOver = function()
{
_root.textSlice = "This is the Slice7";
}
When you have all buttons done test your code (Ctrl + Enter).
![]() |
![]() |
![]() |
![]() |
![]() |






