MACROMEDIA FLASH MX 2004-USING ACTIONSCRIPT IN FLASH Use Manual page 115

Using actionscript in flash
Hide thumbs Also See for FLASH MX 2004-USING ACTIONSCRIPT IN FLASH:
Table of Contents

Advertisement

Optimize bitmaps as much as possible without overcompressing them. A 72-dpi resolution is
optimal for the web. Compressing a bitmap image reduces file size, but compressing it too much
compromises the quality of the graphic. Check that the settings for JPEG quality in the Publish
Settings dialog box do not overcompress the image. If your image can be represented as a vector
graphic, this is preferable in most cases. Using vector images reduces file size, because the images
are made from calculations instead of many pixels. Limit the number of colors in your image as
much as possible while still retaining quality.
Note: Avoid scaling bitmaps larger than their original dimensions, because it reduces the quality of
your image and is processor-intensive.
Set the
property to
instead of changing the
level to 0 or 1 in a SWF file.
_visible
false
_alpha
Calculating the
level for an instance on the Stage is processor-intensive. If you disable the
_alpha
instance's visibility, it saves CPU cycles and memory, which can give your SWF files smoother
animations. Instead of unloading and possibly reloading assets, set the
property to
_visible
, which is much less processor-intensive.
false
Try to reduce the number of lines and points you use in a SWF file. Use the Optimize Curves
dialog box (Modify > Shape > Optimize) to reduce the number of vectors in a drawing. Select the
Use Multiple Passes option for more optimization. Optimizing a graphic reduces file size, but
compressing it too much compromises its quality. However, optimizing curves reduces your file
size and improves SWF file performance. There are third-party options available for specialized
optimization of curves and points that yield different results.
There are several ways to animate content in a Flash document. Animation that uses ActionScript
can produce better performance and smaller file size than animation that uses tweens at times, but
sometimes not. To get the best results, try different ways of producing an effect, and test each of
the options.
A higher frame rate produces smooth animation in a SWF file but it can be processor-intensive,
particularly on older computers. Test your animations at different frame rates to find the lowest
frame rate possible.
For information on best practices and video, see
"Video conventions" on page
110. For an
example of scripted animation, see the animation.fla example in the Samples/HelpExamples
directory in the Flash installation folder.
Working with components in Flash Player
The new component framework lets you add functionality to components, but it can potentially
add considerable file size to an application.
Components inherit from each other. One component adds size to your Flash document, but
subsequent components that use the same framework do not necessarily add more size. As you
add components to the Stage, the file size increases, but at some point, it levels off because
components share classes and do not load new copies of those classes.
Performance and Flash Player
115

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING ACTIONSCRIPT IN FLASH and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents