58
Optimizing content for performance and file size
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 that Flash Lite renders vector graphics, and the more processing that is required
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, you should 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
SetQuality
command, see
SetQuality
in
Flash Lite 1.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 that have 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, key frame animations, and ActionScript-driven
movement to produce the most efficient results.
■
Test animations frequently on your target devices.
Bitmap graphics
Macromedia recommends optimizing bitmap graphics to 16 bits before importing them into
Flash Professional 8. Optimizing your graphics reduces SWF file size and gives you more
control over the final output. Also, ensure that bitmaps are imported at the size they need to
be in the Flash Lite content. Using larger than required bitmaps results in higher runtime
memory requirements.