Android devices generally have a lot less memory and much less CPU power than a traditional desktop or laptop machine. We have to be very careful when building Android applications so as not to create something so power-hungry, that the frame rate drops to unacceptable levels or the application becomes unresponsive. To assist us in troubleshooting and monitoring these issues, we can keep track of the memory consumption and calculated frame rate of the running application which should respond accordingly.
We can monitor many system properties through use of the flash.system
package along with the flash.utils.getTimer
class for calculating the present application frame rate:
1. To begin, we will need to import the following classes into our application:
import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.system.Capabilities; import flash...