Chapter 20. Importing the Design into Catalyst

IN THIS CHAPTER

  • Importing an Illustrator design into Catalyst

  • Organizing artwork

  • Resizing and moving artwork

  • Converting objects to optimized art

Once your design comp is complete in Illustrator, you will be able to import it into Catalyst and begin the process of converting it to an application. This chapter shows you how to perform this import step by step. Make sure that your layers are properly organized, and convert objects into optimized graphics to reduce the final project's file size.

Creating a Catalyst Project from a Design Comp

To begin the process of bringing a comp over from Illustrator, you need to create a new Catalyst project from your design comp. This is a fairly straightforward process, although it might be slow depending on the size and complexity of the design and your computer's resources.

  1. Open Flash Catalyst. On Windows, this will likely be in Start

    Creating a Catalyst Project from a Design Comp
  2. From the Start Screen (see Figure 20.1), click From Adobe Illustrator .AI File under the Create New Project from Design File heading.

  3. Navigate to the folder that contains the AI file you wish to import.

  4. Click the file.

    The Catalyst Start Screen, showing the Create New Project from Design File options

    Figure 20.1. The Catalyst Start Screen, showing the Create New Project from Design File options

  5. Click Open. Catalyst displays the Importing Adobe Illustrator File dialog box (see Figure 20.2) and shows a progress bar as it opens the Illustrator file, analyzes it, and prepares it for import. Once complete, the Illustrator Import Options dialog box appears (see Figure 20.3).

    Note

    If you have not created a design file to use, you can download chapter20_start.ai from the book's Web site (www.wiley.com/go/flashcatalystbible).

  6. Double-check that the artboard size and background color options are correct. The importer should have detected the correct size and background color from the artboard.

  7. Set the Fidelity options and Other import options as desired. For this example, we will keep all of the defaults.

    The Importing Adobe Illustrator File dialog box and progress bar

    Figure 20.2. The Importing Adobe Illustrator File dialog box and progress bar

    The Illustrator Import Options dialog box

    Figure 20.3. The Illustrator Import Options dialog box

    Note

    See Chapter 5 for a detailed discussion on the Fidelity and other options in the dialog box.

  8. Click OK. The Importing Adobe Illustrator File dialog box appears with a progress bar. Once complete, the design should open in Catalyst (see Figure 20.4).

The Importing Adobe Illustrator File dialog box and progress bar

Figure 20.4. The Importing Adobe Illustrator File dialog box and progress bar

Catalyst cannot import extremely large or complex Illustrator files. If you get an error message during the import that tells you the file has too many objects to be imported, you will need to return to Illustrator and break the file into smaller, separate files that can be imported (see Figure 20.5).

Note

See Chapter 19 for details on breaking a design into smaller files to allow for import.

The error message displayed if an Illustrator design is too complex

Figure 20.5. The error message displayed if an Illustrator design is too complex

The Importing Adobe Illustrator File dialog box may update during import informing you that your artwork contains a large number of bitmap or vector graphics and that you may want to consider optimizing them (see Figure 20.6). This process is discussed later in this chapter. In addition, a dialog box may appear when you complete the import process informing you of problems that occurred (Figure 20.7).

Often, this occurs when your Illustrator design uses Illustrator features such as Live Paint or Live Trace, or when text could not be preserved as editable objects. These issues will rarely affect your work as you build the project in Catalyst. If this dialog box appears, simply click OK.

The Optimized Graphics dialog box

Figure 20.6. The Optimized Graphics dialog box

A dialog box after your import informs you problems have occurred

Figure 20.7. A dialog box after your import informs you problems have occurred

Organizing Artwork

Once your file is imported into Catalyst, you will want to check the Layers panel and ensure that the artwork is organized the way you want. Ideally, this will be done in Illustrator, but in dealing with large or complex files, it can be easy to forget to rename layers or organize them into groups, so you will likely need to do at least some of that work in Catalyst.

Rename layers

Layers and layer groups will be imported from directly from Illustrator. Just as in Illustrator, you can double-click a layer name to rename it (see Figure 20.8).

  1. Click the small arrow to the left of a layer group to expand it and examine its sublayers.

  2. Double-click a layer you want to rename.

  3. Type a new name and press Enter.

Renaming a layer in Catalyst

Figure 20.8. Renaming a layer in Catalyst

Note

Renaming a layer in Catalyst has no effect on the layer's name in Illustrator, as the files are not linked.

Create new layers

You can create new layers in Catalyst if you discover the need for a group that was not created in Illustrator.

  1. Click the Create New Layer button at the bottom of the Layers panel. This creates a new layer at the top of the layers panel (see Figure 20.9).

    A newly created layer

    Figure 20.9. A newly created layer

    Note

    New layers are always added at the top of the Layers panel, regardless of the layer you currently have selected.

  2. Double-click the new layer and type a new name.

  3. Drag existing layers or groups onto the new layer to move those elements into the layer (see Figure 20.10).

Adding content to a new layer

Figure 20.10. Adding content to a new layer

Creating new sublayers

Layers in Catalyst are top-level items and are placed at the top of the layer stack. If you want to create a new layer within an existing layer, you need to use the Create New Sublayer button.

  1. Click the layer into which you want to add a sublayer.

  2. Click the Create New Sublayer button. A new sublayer appears (see Figure 20.11).

  3. Drag existing layers or layer groups onto the new layer to place them in the new sublayer (see Figure 20.12).

A newly created sublayer

Figure 20.11. A newly created sublayer

Adding existing elements to the layer

Figure 20.12. Adding existing elements to the layer

Deleting layers

Occasionally, you may encounter situations where Illustrator creates layers that add unnecessary complexity to your project. These layers can be deleted.

  1. Drag a sublayer's content to another sublayer.

  2. Click the sublayer.

  3. Click the Delete button in the bottom of the layer panel (see Figure 20.13).

Deleting a layer

Figure 20.13. Deleting a layer

Removing unneeded groups

Almost all artwork from Illustrator will be in a group, which can, like unneeded layers, add complexity to your project. If you remove all of a group's contents, the group is deleted automatically (see Figure 20.14).

Removing a group by moving its contents to a different sublayer

Figure 20.14. Removing a group by moving its contents to a different sublayer

Moving, Rotating, and Resizing Artwork

Should you change your mind about the size or location of artwork once you have imported a design into Catalyst, you can use its drawing tools to make the needed changes without having to go back to Illustrator.

Moving artwork

You may need to reposition artwork as the design of the project undergoes changes. In this case, the design initially had the featured magazines artistically placed at angles in a group, but the client has now requested that they be displayed in a linear fashion. This will allow you to convert them to a data list and eventually populate the list with data from a database.

  1. Click the Select tool.

  2. Click the item to be moved and drag it to a new location (see Figure 20.15).

  3. Repeat Step 2 for any additional items to be moved.

Moving the magazines into their new positions

Figure 20.15. Moving the magazines into their new positions

Rotating artwork

The magazines now need to be rotated so that they are straight.

  1. Click the Select tool.

  2. Click the object you want to rotate (see Figure 20.16).

  3. Click the Rotate tool.

  4. Click and drag near a corner of the object until you reach the desired rotation.

  5. Repeat Steps 1 through 4 to rotate any additional objects.

Rotating the magazines

Figure 20.16. Rotating the magazines

Resizing artwork

You can resize the artwork using either the Select or Direct Select tools in Catalyst. Prior to converting artwork to components or optimized graphics, the two tools will work the same.

  1. Click the Select tool.

  2. Click the object you want to resize.

  3. Click and drag one of the control handles — the white squares along the edge of the object — to resize (see Figure 20.17). You can resize while maintaining the shape's proportions by holding the Shift key while you drag one of the corner handles.

Resizing an object in Catalyst

Figure 20.17. Resizing an object in Catalyst

Convert Artwork to Optimized Graphics

Most artwork that will not be converted to components should be converted to an optimized graphic. Complex artwork, particularly vector art created in Illustrator, requires significant overhead when rendered in Flash Player. Optimizing the graphic allows Catalyst to define it in such a way as to minimize this overhead.

Tip

Catalyst is generating code for every object it creates. MXML in Flex 4 provides the ability to define even extremely complex shapes through code. When you convert a shape to an optimized graphic, Catalyst removes its corresponding code from the main project file and places it in a separate file that is then referenced in the main code. This process allows Catalyst to keep the size of the main file smaller, allowing it to run more efficiently.

Warning

Do not optimize graphics that you will need to alter dynamically at runtime, as optimized graphics will become static artwork in your application.

  1. Click the Select tool.

  2. Click the artwork on the artboard that you want to convert. You can press and hold the Shift key to select multiple items to convert as a group, such as an item with a drop shadow.

  3. On the HUD, click Choose Comment

    Convert Artwork to Optimized Graphics
Converting artwork to an optimized graphic

Figure 20.18. Converting artwork to an optimized graphic

Once converted, optimized graphics are stored in your project's library. Therefore, if you want to reuse the graphic elsewhere in your application, you can simply drag it from the library to the artboard as needed.

Summary

In this chapter, you continued building the Magazines Direct Web application. You saw how to:

  • Import Illustrator artwork into Catalyst

  • Organize the artwork in layers

  • Move, rotate, and resize artwork

  • Optimize complex graphics in Catalyst

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.162.49