Need Assistance? 01384 442752 (UK)

Graphics in Flash

How to Work with Graphics in Flash

The great thing about Flash was that it not only allows you to create graphics, but it also allows you to work with graphics imported from other programs. This allows you to create graphics in vector based packages such as Freehand or Illustrator or bitmap packages such as Photoshop, Fireworks or Paint Shop Pro.  It also allowed you to import scanned images, photos, etc. to incorporate in your Flash movie.

Flash has however been becoming increasingly incompatible with more modern computer systems. Most professionals we know would suggest it is redundant software.

Flash supports a variety of bitmapped and vector based images. For bitmap images, Flash accepts GIF, PNG, JPEG, BMP and TIFF. For vector images, Flash accepts files in Freehand and Illustrator format. Many programs such as Freehand & Fireworks also support exporting to Flash’s format of SWF.

If you are creating complex graphics (eg: graphics with gradients) in vector format, it is best to export to SWF format before importing into Flash as Flash may have problems with supporting some vector functions.

There are two ways to bring graphics into Flash. Either import directly or via the clipboard. The clipboard method is fairly easy in that you cut or copy from one application (such as Photoshop) and then paste directly onto the stage in Flash.

The import method requires you to import the image via the file menu. One advantage with using import is that you can import directly into the library so the object is ready to use at your convenience. Importing also allows you to ‘batch import’ a series of images, sound clips or animations.

TURNING BITMAPS INTO VECTOR GRAPHICS

Once you have imported a bitmap graphic, Flash can turn it into a series of vector images, which in turn can be grouped together as a single object. The advantage in doing this is that you can benefit from the features that vector graphics give such as scalability, transformation options and smaller file sizes.

Flash gives you options to strike a balance between accurate rendering of the bitmap and creation of too many curves and small vectors, which increase the file size.

Flash creates the vectors by examining the pixels that make up the bitmap, lumping together contiguous blocks of the same or similar colour and making a vector object out of that clump. Each clump is converted to a single colour so obviously the sensitivity of the tool used to convert the bitmap (named ‘tracing’) effects the quality of the converted vector image.

To turn a bitmap into a vector graphic, simply select the bitmap and then click on ‘modify’ then ‘bitmap’ then ‘trace bitmap’.  When tracing a bitmap, you will be presented with the following options:
Colour threshold: This can be a value between 1 and 200. This determines the sensitivity of deciding when neighbouring colours are the same as each other. A lower number leads to a lower sensitivity which means a less defined image but also a smaller file size.

Minimum area: This can be a value between 1 and 1000. This determines how many neighbour pixels to include in calculating the colour.

Curve fit: This specifies how smoothly to draw the outlines around the vector shapes it creates.

Corner threshold:  This specifies whether to create sharp corners or more rounded ones.

Curve Fit: This determines how smoothly outlines will be drawn

Sometimes, it is best to play around with these settings to get the best balance for your imported bitmaps. A handy tip to know though is that it is recommended to have a colour threshold of 10, minimum area of 1, ‘pixels’ for curve fit and ‘many corners’ for corner threshold if you are tracing the bitmap for a photograph.

 
This is an extract from our course notes. See our IT courses at https://www.acsedu.co.uk/Courses/Information-Technology-Courses.aspx

 

[26/01/2021 02:21:19]