Adobe Flash Professional CC 2014 v.13.0 User Manual
Page 870
Best practices - Tips for creating content for mobile devices
Creating Flash content for use on mobile devices
Flash Lite guidelines for animation in mobile devices
Flash Lite bitmap and vector graphics in mobile devices
Set compression of Flash Lite bitmaps for mobile devices
Optimizing Flash Lite frames for mobile devices
Optimizing ActionScript for Flash Lite content on mobile devices
Managing Flash Lite file memory for mobile devices
Loading data for mobile devices in Flash Lite
Exclude classes from compilation for Flash Lite
Creating Flash content for use on mobile devices
To create Flash content for mobile devices, follow some basic principles. For example, Flash developers often avoid extremely complex artwork
and excessive tweening or transparency.
Flash Lite developers face additional challenges because performance on mobile devices varies greatly. If content must be published to many
different devices, developers sometimes have to author for the lowest common denominator.
Optimizing mobile content requires making trade-offs. For example, one technique may make the content look better, while another results in better
performance. As you evaluate these trade-offs, you will be going back and forth repeatedly between testing in the emulator and testing on the
target device. You must see your content on the actual device to evaluate the trueness of colors, text readability, physical interactions, UI
responsiveness, and other aspects of the real mobile experience.
For more tips and techniques for creating content for mobile phones and devices, see
.
Flash Lite guidelines for animation in mobile devices
When creating animated content for a mobile devices, keep device CPU limitations in mind. Following these guidelines can help preventFlash Lite
content from running slowly:
When creating a new Flash Lite file, check that the document is set up correctly. Although Flash files scale smoothly, performance can suffer
if the file is not running at its native Stage size and has to scale in the player. Try to set the document Stage size to match the resolution of
the target device. Also set the Flash Player to the correct version of Flash Lite.
Flash Lite can render vector graphics at low, medium, and high quality. The higher the rendering quality, the more smoothly and accurately
Flash Lite renders vector graphics and the greater the demand on the device’s CPU. To provide complex animation, experiment with
changing the player’s quality setting and then thoroughly test the SWF file. To control the rendering quality of a SWF file, use the _quality
property or the SetQuality command. Valid values for the _quality property are LOW, MEDIUM, and HIGH.
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, 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 actual target devices.
When Flash draws an animated region, it defines a rectangular bounding box around the area. Optimize the drawing by making that
rectangle as small as possible. Avoid overlapping tweens, because Flash interprets the merged area as a single rectangle, resulting in a
larger total region. Use Flash's Show Redraw Region feature to optimize the animation.
Avoid using _alpha = 0 and _visible = false to hide on-screen movie clips. If you simply turn a movie clip’s visibility off or change its alpha to
zero, it is still included in line-rendering calculations, which can affect performance.
Similarly, do not try to hide a movie clip by obscuring it behind another piece of artwork. It will still be included in the player’s calculations.
Instead, move movie clips completely off the Stage or remove them by calling removeMovieClip.
For more tips and techniques for creating content for mobile phones and devices, see
.
863