Disable mouse interaction as much as possible.
When interactive objects (such as movieclip or Sprite objects) are used, Flash Player executes the Local MachineCodeTo detect and process mouse interactions. When many interactive objects are displayed on the screen, especially when they overlap, detecting mouse interaction may occupy a large amount of CPU resources. One easy way to avoid this is to disable mouse interaction for objects that do not require any mouse interaction. The following code describes how to use the mouseenabled and mousechildren attributes:
// Disable any mouse interaction with this interactiveobject
Myinteractiveobject. mouseenabled = false;
Const max_num: Int = 10;
// Create a container for the interactiveobjects
VaR container: SPRITE = new sprite ();
For (var I: Int = 0; I <max_num; I ++)
{
// Add interactiveobject to the container
Container. addchild (New sprite ());
}
// Disable any mouse interaction on all the children
Container. mousechildren = false;
Disable mouse interaction as much as possible, which helps your applicationProgramUse less CPU to reduce battery usage.