Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

Using Macromedia Flash: Importing Graphics

Using Macromedia Flash – Importing Graphics

When you work with Flash, you’ll often import assets into a document. Perhaps you have a company logo or graphics that a designer has provided for your work. You can import a variety of assets into Flash, including sound, video, bitmap images, and other graphic formats (such as PNG, JPEG, AI, and PSD).

Imported graphics are stored in the document’s library. The library stores both the assets that you import into the document and symbols that you create within Flash. A symbol is a vector graphic, button, font, component, or movie clip that you create once and can reuse multiple times.

So you don’t have to draw your own graphics in Flash: You can import an image of a garden variety gnome from the tutorial source file. Before you proceed, make sure that you download the support files for this article (if you haven’t done so already) and extract the images to the same directory as your banner.fla document.

  1. Select File > Import > Import to Library to import an image into the current document.

    You’ll see the Import dialog box (see Figure 5), which enables you to browse to the file you want to import.

    Browse to the folder on your hard drive that contains an image to import into your Flash document.

    Figure 5. Browse to the folder on your hard drive that contains an image to import into your Flash document.

  2. Navigate to the directory where you extracted the support files, select the gnome.png image, and click Open (Windows) or Import (Macintosh).

    The image is imported into the document’s library.

    Note: You can drag assets from the library onto the Stage several times if you want to see several instances of the artwork. Your file size doesn’t increase if you use several instances on the Stage. The SWF file only stores the information of the original symbol or asset from the library and treats each instance like a duplicate.

  3. Select Window > Library to open the Library panel.

    You’ll see the image you just imported, gnome.png, in the document’s library.

  4. Select the imported image in the library and drag it onto the Stage.

    Don’t worry about where you put the image on the Stage because you’ll set the coordinates for the image later. When you drag something onto the Stage, you will see it in the SWF file when the file plays.

  5. Click the Selection tool and select the instance on the Stage.

    If you look at the Property inspector you’ll notice that you can modify the image’s width and height, as well as the image’s X and Y position (also called coordinates) on the Stage. When you select an object on the Stage, you can see and modify the current coordinates in the Property inspector (see Figure 6).

    The X and Y coordinates match the registration point, which is the upper left corner of this movie clip symbol.

    Figure 6. The X and Y coordinates match the registration point, which is the upper left corner of this random movie clip symbol.

  6. Type 0 into the X text box and type 0 into the Y text box. Doing this sets the X and Y coordinates both to 0, as shown in Figure 7.

    Set the X and Y coordinates using the Property inspector. Set the X and Y values to 0.

    Figure 7. Set the X and Y coordinates using the Property inspector. Set the X and Y values to 0.

    Setting new coordinates moves the upper left corner of the image to the upper left corner of the Stage. You can drag the bitmap image around the Stage using the Selection tool instead of changing coordinates in the Property inspector. You should use the Property inspector when you need to set a specific position for an object, as you did in this step.

Remember to save the document before you proceed to the next exercise.

Note: You can also import sound files into your FLA documents. This isn’t covered in this tutorial, but you can find out more information if you do a search on “importing sounds” in the Help panel (F1).

Comments