User Guide
72 Optimizing Content for Performance and Memory
Animation guidelines
When creating animated content for a mobile phone, it is important to consider the phone’s
CPU limitations. The following guidelines can help prevent your Flash Lite content from
running slowly:
■ Flash Lite can render vector graphics in your application at three different quality levels:
low, medium, and high. The higher the rendering quality, the more smoothly and
accurately Flash Lite renders vector graphics and the more processing it requires of the
device’s CPU. If you need to provide complex animation, experiment with changing the
player’s quality setting of the content. Because changing the quality setting can noticeably
affect the visual quality of the Flash Lite content, thoroughly test the SWF file.
To control the rendering quality of a SWF file, you can use the
_quality property or the
SetQuality command.
For the
_quality property, valid values are LOW, MEDIUM, and HIGH. The following code
sets the rendering quality to
LOW:
_quality = "LOW";
For more information about the SetQuality command, see SetQuality in the
fscommand2 function entry in the Flash Lite 2.x ActionScript Language Reference.
■ Limit the number of simultaneous tweens. Reduce the number of tweens, or sequence the
animation so that one begins when another ends.
■ Use transparency (alpha) effects on symbols sparingly because they are CPU intensive. In
particular, it is better to avoid tweening symbols with alpha levels that are not fully opaque
(less than 100%).
■ Avoid CPU-intensive visual effects, such as large masks, extensive motion, alpha blending,
extensive gradients, and complex vectors.
■ Experiment with combinations of tweens, keyframe animations, and ActionScript-driven
movement to produce the most efficient results.
■ Rendering vector ovals and circles is much more memory intensive than rendering
quadrangles. Using round and oval strokes also greatly increases CPU use.
■ Test animations frequently on your target devices.
Bitmap versus vector graphics
Flash Lite can render both vector and bitmap graphics, and each type of graphic has its
advantages and disadvantages. Whether to use vector or bitmap graphics is not always a clear
decision, and often depends on several factors. This section discusses some of the differences
between vector and bitmap graphics to consider when deciding what type of graphic to use.