Flash
  Home arrow Flash arrow Page 2 - Animations and Interaction
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
FLASH

Animations and Interaction
By: Bill Sanders
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 14
    2004-07-07

    Table of Contents:
  • Animations and Interaction
  • Vector Graphics Versus Bitmap Graphics
  • Working the Timeline
  • Using Shape Hints to Morph Fonts
  • Tweening Imported Vector Graphics
  • Making and Using Guide Layers
  • Masking Layers
  • Echoing Layers
  • Timeline Effects
  • Choosing Positions for a Figure
  • Animating the Spearman and the Buffalo

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Animations and Interaction - Vector Graphics Versus Bitmap Graphics


    (Page 2 of 11 )

    Bitmapped graphics can be imported from various sources, ranging from digital photos to user-created graphics developed on drawing applications. As noted in Chapter 1, "Getting to Know Flash Pro," bitmapped graphics are "weightier" (have larger file sizes) than vector graphics in most cases, and Flash has an option for transforming bitmapped graphics into vector graphics (select Modify, Bitmap, Trace Bitmap). Depending on the settings used to convert a bitmapped graphic into a vector graphic, the weight differs significantly. When you're using digital photographs in JPEG format, a good-quality picture will actually result in a much higher weight for a vector graphic than a bitmapped graphic. To reduce the graphic weight, the original JPEG graphic is distorted when it's transformed into a vector graphic, as shown in Figures 4.3 and 4.4.

    sanders

    Figure 4.3 - The original graphic in JPEG format created with a screenshot.

    sanders

    Figure 4.4 - Once a bitmapped graphic has been changed to a vector graphic, reduction to a smaller file size can distort the graphic.

    Tracing vector graphics from bitmapped graphics has an inverse relationship between quality and size. The graphic in Figure 4.4 only resolved to a SWF file of about 12KB. However, when the bitmap tracing used higher-quality settings, the SWF file with the vector image was 193KB. The bitmapped image in the SWF file was only 12KB as well, so other than blurring the picture and gaining the ability to change the size of the image without pixel distortion, nothing is gained by changing the image from bitmapped to vector graphics. The weight of the SWF files for both the vector graphic and bitmapped graphic are the same.


    Starting with the Right Tools - When you need to change the size of a bitmapped graphic, rather than changing it into a vector graphic and making it larger or smaller, it's generally a better idea to change the bitmapped graphic in an application such as Macromedia Fireworks or Adobe Photoshop and then import it into Flash.


    Table 4.1 provides an overview of the unique settings in the Trace Bitmap dialog box. Compare the file sizes in the last line of the table to see how the settings have an impact on the file sizes of the bitmap.

    Table 4.1 Trace Bitmap Parameters and Settings

    Parameter

    Settings

    Sample 1

    Sample 2

    Color Threshold

    1–500. The lower the setting, the more unique colors that are included.

    100

    10

    Minimum Area

    1–1000. Takes into account the number of pixels to consider when assigning color values.

    10

    1

    Curve Fit

    The Pixels setting is more exacting than the Normal setting, which gives you a smoother fit and therefore takes more memory.

    Normal

    Pixels

    Corner Threshold

    Many Corners, Normal, or Few Corners. The more corners, the more exact the fit.

    Normal

    Many Corners

    SWF File Size

    Single graphic in SWF file.

    12KB

    193KB


    The best practice in using the Trace Bitmap dialog box depends on meeting the needs of your project. Ideally, if you can create your graphics in Flash, you won't have to worry about the weight and limitations of bitmapped graphics in your applications.

    When imported into Flash, complex vector graphics, especially those created with a program such as Macromedia FreeHand or Adobe Illustrator, can be very heavy. A 50KB FreeHand illustration imported into Flash will not be lighter than a 50KB bitmapped graphic, and although it retains the ability to be changed without distortion, such an image can be very heavy. For example, a 25KB vector graphic image imported from FreeHand will compile into about a 45KB SWF file.

    Often a bitmapped graphic may be more appropriate for a Flash movie for nondynamic content such as backgrounds. Also, because certain graphic images such as digital photographs are very heavy when converted to vector graphics, they, too, are best left in bitmapped format.

    However, vector graphics can be created in Flash and other applications and used effectively in a Flash movie. The point to keep in mind is that complex and heavy vector graphics won't become less heavy if imported into Flash and compiled into a SWF file.

    This chapter is from Macromedia Flash MX Professional 2004, by Bill Sanders (Sams, 2004, ISBN: 0672326051). Check it out at your favorite bookstore today.

    Buy this book now.

    More Flash Articles
    More By Bill Sanders


     

    FLASH ARTICLES

    - Critical Flash Vulnerability Heats Up the Web
    - More on Nonpersistent Client-Side Remote Sha...
    - Nonpersistent Client-Side Remote Shared Obje...
    - Using the Decorator Pattern for a Real Web S...
    - Using Concrete Decorator Classes
    - Delving More Deeply into the Decorator Patte...
    - The Decorator Pattern in Action
    - A Simple Decorator Pattern Example
    - Decorator Pattern
    - Organizing Frames and Layers for Flash Anima...
    - Organizing Frames and Layers
    - Using XML and ActionScript with Flex Applica...
    - Interfaces and Events with ActionScript and ...
    - Manipulating Data with ActionScript in Flex ...
    - ActionScript Syntax for Flex Applications







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek