Adobe FLASH CS3 PRO User Manual page 501

Hide thumbs Also See for FLASH CS3 PRO:
Table of Contents

Advertisement

Flash Lite bitmap and vector graphics in mobile devices
Flash Lite can render both vector and bitmap graphics. Each type of graphic has its advantages and disadvantages.
The decision to use vector rather than bitmap graphics is not always clear and often depends on several factors.
Vector graphics are compactly represented in SWF files as mathematical equations and rendered at run time by the
Flash Lite player. In contrast, bitmap graphics are represented as arrays of picture elements (pixels), which require
more bytes of data. Therefore, using vector graphics in a file can help reduce file size and memory usage.
Vector graphics also maintain their smooth shapes when scaled in size. Bitmap images can appear boxy, or pixelated,
when scaled.
Compared to bitmaps, vector graphics require more processing power to render, especially vector graphics that have
many complex shapes and fills. Consequently, heavy use of vector shapes can sometimes reduce overall file perfor-
mance. Because bitmap graphics do not require as much processing time to render as vector graphics, they are better
choice for some files, for example, a complex road map meant to be animated and scrolled on a mobile phone.
Keep these considerations in mind:
• Avoid using outlines on vector shapes. Outlines have an inner and outer edge (fills have only one) and are twice
the work to render.
• Corners are simpler to render than curves. When possible, use flat edges, especially with very small vector shapes.
• Optimization is especially helpful with small vector shapes such as icons. Complex icons may lose their details
upon rendering, and the work of rendering the details is wasted.
• As a general rule, use bitmaps for small, complex images (such as icons) and vector graphics for larger and simpler ones.
• Import bitmap graphics at the correct size; don't import large graphics and scale them down in Flash, because this
wastes file size and run-time memory.
• The Flash Lite player does not support bitmap smoothing. If a bitmap is scaled or rotated, it will have a chunky
appearance. If it is necessary to scale or rotate a graphic, consider using a vector graphic instead.
• Text is essentially just a very complex vector shape. Of course, text is often critical, so it can rarely be avoided
entirely. When text is needed, avoid animating it or placing it over an animation. Consider using text as a bitmap.
For multiline dynamic and input text, the line break of the text string is not cached. Flash breaks lines at run time
and recalculates the breaks every time the text field needs to be redrawn. Static text fields are not problematic,
because the line breaking is precalculated at compile time. For dynamic content, using dynamic text fields is
unavoidable, but when possible, consider using static text fields instead.
• Minimize the use of transparency in PNG files; Flash must calculate redraws even for the transparent portions of
the bitmap. For example, with a transparent PNG file that represents a foreground element, don't export the trans-
parent PNG at the full size of the screen. Instead, export it at the actual size of the foreground element.
• Try to group bitmap layers together and vector layers together. Flash needs to implement different renderers for
bitmap and vector content, and switching between renderers takes time.
Set compression of Flash Lite bitmaps for mobile devices
When using bitmaps, you can set image-compression options (on a per-image basis or globally for all bitmap images)
that reduce SWF file size.
Set compression options for an individual bitmap file
Start Flash and create a document.
1
2
Select a bitmap in the Library window.
FLASH CS3
495
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash cs3 professional

Table of Contents