Import bitmaps at runtime, Apply a bitmap as a fill – Adobe Flash Professional CS3 User Manual

Page 163

Advertising
background image

FLASH CS3

User Guide

157

3

For Compression, select one of the following options:

Photo (JPEG)

Compresses the image in JPEG format. To use the default compression quality specified for the

imported image, select Use Document Default Quality. To specify a new quality compression setting, deselect Use
Document Default Quality and enter a value between 1 and 100 in the Quality text field. (A higher setting preserves
greater image integrity but yields a larger file size.)

Lossless (PNG/GIF)

Compresses the image with lossless compression, in which no data is discarded from the image.

Note: Use Photo compression for images with complex color or tonal variations, such as photographs or images with
gradient fills. Use Lossless compression for images with simple shapes and relatively few colors.

4

To determine the results of the file compression, click Test. To determine if the selected compression setting is

acceptable, compare the original file size to the compressed file size.

5

Click OK.

Note: JPEG Quality settings that you select in the Publish Settings dialog box do not specify a quality setting for imported
JPEG files. Specify a quality setting for each imported JPEG file in the Bitmap Properties dialog box.

Import bitmaps at runtime

To add bitmaps to a document at runtime, use the ActionScript™ 2.0 or the ActionScript 3.0

BitmapData

command.

To do so, specify a linkage identifier for the bitmap. For more information, see Assigning linkage to assets in the
library in Learning ActionScript 2.0 in Adobe Flash or Exporting library symbols for ActionScript in Programming
ActionScript 3.0
.

1

Select the bitmap in the Library panel.

2

Do one of the following:

Select Linkage from the Panel menu in the upper-right corner of the panel.

Right-click (Windows) or Control-click (Macintosh) the bitmap name in the Library panel, and select Properties
from the context menu.

If the Linkage properties aren’t visible in the Properties dialog box, click Advanced.

3

For Linkage, select Export For ActionScript.

4

Enter an identifier string in the text field, and click OK.

Apply a bitmap as a fill

To apply a bitmap as a fill to a graphic object, use the Color panel. Applying a bitmap as a fill tiles the bitmap to fill
the object. The Gradient Transform tool allows you to scale, rotate, or skew an image and its bitmap fill.

1

To apply the fill to existing artwork, select a graphic object or objects on the Stage.

2

Select Window > Color.

3

Select Bitmap from the pop-up menu in the center of the panel.

4

To use a larger preview window to display more bitmaps in the current document, click the arrow in the lower-

right corner to expand the Color panel.

5

Click a bitmap to select it.

The bitmap becomes the current fill color. If you selected artwork in step 1, the bitmap is applied as a fill to the
artwork.

Advertising