Eyeland Studio: Custom Design
Member Log-In:  Go 
Forgotten password?
 HOME   GAMES   CONTACT   
· Products ·
 Template Foundry
 Games in a Flash


 Ping-A-Pal


 Custom Design

· Newsletter ·
Free Stuff!
Sign up the Design Now newsletter, and get notified about all the freebies, products, and specials available on our network of websites!
Email address:
· Links ·
Affiliate Partners
Tutorial: Optimizing Clip Art in Flash

Optimization can be the difference between a professional looking Flash file and one that looks unpolished or animates sluggishly. The benefits go beyond merely reducing the file size of the final output (the .swf file). Optimized artwork also works much better with Flash's special effects such as transparency and shape tweening (morphing). In addition, the Flash player is able to animate optimized vector imagery much more efficiently due to the decreased amount of data it has to deal with in every frame.

The built-in Optimize feature of Flash is useful in some circumstances. But I'll show you a technique which is easier, more effective, and maintains the original image integrity more consistently.

Optimizing Using the Break Apart Feature

The easier and more effective method for optimizing vector artwork in Flash is simply to break the artwork apart until it can't be broken apart anymore, then regroup it.

To break apart the artwork, simply select your artwork and choose Modify > Break Apart (Mac: Cmd + B or Win: Ctrl + B). Clip art (and other vector artwork) is often created using multiple grouped objects (see Fig.1). So you might have to break apart the artwork more than once - until you see a screen pattern on each shape that comprises the artwork (see Fig. 2).

After breaking apart the artwork as much as possible, regroup it (Mac: Cmd + G or Win: Ctrl + G) and turn it into a symbol (Choose Insert > Convert to Symbol), unless you plan to use the shape morphing feature. When you break apart artwork in Flash and then regroup it, Flash throws out unnecessary data and reduces the file size.

Optimizing Using the Optimize Feature

If the first method does not provide enough file size saving or does not improve performance enough, you can try using the Optimize feature. To use the Optimize feature, first break apart the artwork.

Select Modify > Optimize to open the Optimize Curves dialog box (see Fig. 3). The Optimize feature works by smoothing lines and removing curves. The amount of data required by a vector image increases with every direction change in a line that defines a shape.

Experiment. The more curves you remove, the more the shape of the artwork is compromised. For some images this is fine, such as grass or leafy trees. For images such as character artwork, this can be very undesirable. Or you can intentionally use the Optimize feature to subtly or even aggressively change the look of a piece of clip art. See Fig. 4.

The Advantages of Optimizing Vector Imagery in Flash

One of the main advantages to optimizing images in Flash is the resultant file size savings. While the size reduction will vary from project to project, the difference can often be substantial. For example, we took four images from Image Club Business in Motion and created two versions of an animation (see Fig.5). The output file for the unoptimized version was almost 42 KB and the optimized version was just under 13 KB - that's over 65% file size reduction merely by breaking a few images apart!

Another advantage is improved performance. For instance, we created a simple dodge game using clip art from Image Club Neo Techno. Players must navigate a spaceship to avoid asteroids hurtling towards it. Flash is able to animate the spaceship and the multiple versions of the asteroids much more smoothly when the imagery has been optimized.

In many cases, optimized artwork looks and works better when effects are applied. For instance, clip art often contains multiple overlapping shapes. While this is good for isolating a section of clip art for a particular purpose, it's bad for alpha transparency effects in Flash. Without optimization, many clip art images with overlapping shapes look rough and unfinished when alpha transparency is applied. In addition, Flash has an even harder time animating an unoptimized image when effects like alpha transparency are applied to it. See Fig. 7.
 


Fig. 1

Fig. 1 - If your artwork has multiple nested grouped objects, use the break apart command again until there are no more groups left.

Fig. 2

Fig. 2 - Shapes show a screen pattern when they have been broken apart as much as possible.

Fig. 3

Fig. 3 - The further the slider is to the right, the more curves will be removed with the Optimize feature.

Fig. 4

Fig. 4 - The Optimize feature affects the integrity of artwork. Compare the original, left, with the image at right, optimized with a Maximum setting.

Fig. 5

Fig. 5 - The final output of this simple animation was decreased by over 65% by optimizing the imagery by using the simple break apart method.

Fig. 6

Fig. 6 - Flash can animate the spaceship and the multiple copies of the asteroids more smoothly when the imagery has been optimized.

Fig. 7

Fig. 7 - The optimized version of this clip art image (top left) and the unoptimized version (top right) have both had 50% alpha transparency applied to them (the original clip art image is shown bottom center).
 
 
 

Design Now
  Games In A Flash — custom flash games  
©1999-2005 Eyeland Studio Inc.   All Rights Reserved.