Think of the Color Mixer panel as the "boss" of the Color Swatches panel. The Color Swatches panel handles the color inventory and serves up the available colors, but the Color Mixer panel has the power to modify those colors and add the variations to the current set. The Color style menu available on the Color Mixer panel allows you to choose the type of color pattern that you want to work with — including solid colors, linear and radial gradients, and bitmap fills.
In Flash 8, gradient styles can be used with strokes as well as with fills. This option has great potential for creating custom line styles for borders and other
As shown in Figure 7-12 and Figure 7-13, the Color Mixer panel enables you to create new colors, with settings in any of three color spaces — RGB, HSB, or hex — using either manually entered values or the "rainbow" color picker field. All colors are handled with four channels, which are RGBA (red, green, blue, alpha); these values can be individually adjusted using the Color value fields and slider controls. The Tint slider control enables you to dynamically shift your current color
Figure 7-12: The Flash 8 Color Mixer panel
Figure 7-13: Colors modified in the Mixer panel can be added to the Color Swatches panel.
As shown in Figure 7-13, colors modified in the Color Mixer panel can be added to the palette loaded in the Color Swatches panel — just select Add Swatch from the Color Mixer panel options menu and the color will be added below the colors currently loaded in the Color Swatches panel.
Any color swatch selected in the Color Swatches panel will be loaded into the Mixer panel as a starting point only — modifications made in the Mixer panel will not change the original color in the Color Swatches panel. The new color or gradient that you create using the controls in the Color Mixer panel (shown in Figure 7-14) will be added as a new swatch only when you select Add Swatch from the options menu. You can always edit your custom color by selecting the new (saved) swatch, but the modified version will be treated as a new color and will also have to be added to the Color Swatches panel separately.
Figure 7-14: The Color Mixer panel preview swatch
The colors you create and add to the Color Swatches panel will be saved with the document (.fla) as long as you do not reload the default set or overwrite the loaded swatch set. If you want to save your custom mixed colors, remember to save the Flash color set (.clr) to a folder using the Save Colors command in the Color Swatches panel before you reload the default Web 216 color set or Replace Colors with a new palette.
When you select a color from the Swatches pop-up palette, the cursor converts to a Dropper tool that enables you to sample color from
The same Dropper feature is available from any of the Swatches pop-ups, but the colors you select this way will not be stored in the Color Swatches panel unless you use the Color Mixer panel menu's Add Swatch option.
To pick up colors with the Dropper tool outside of the Flash application itself, be careful not to release the mouse button while you move the mouse from the Swatches in the Color Mixer panel to the other color that you want to sample. If you release the mouse button before moving it to the color you want to sample, you will be able to pick up colors from inside the Flash application only.
The Alpha control in the Color Mixer panel (and in the Swatches pop-ups) is used to adjust the transparency of stroke and fill colors, either to modify a selected graphic (shape or Drawing Object) or to create a new color that can be added to the Color Swatches panel.
There are two ways to change the Alpha value for a selected color: Either drag the Alpha slider until the preview display looks right, or enter a numeric value directly in the Alpha value box. Numeric entry is useful when you already know what level of transparency is required, while the slider is useful for tweaking the transparency by eye to get it just right — as indicated in either the stroke or fill color chip or the color preview in the Color Mixer panel. In Figure 7-15, a stroke color and a fill color have both been adjusted to 50 percent alpha and then added to the Color Swatches panel. While the Alpha slider is being dragged to a new setting, the preview displays the original 50 percent Alpha value (at the bottom) as well as the current 25 percent Alpha value (at the top). The rectangle below the panels shows the 50 percent alpha stroke and fill applied to a shape. The Flash grid has been turned on (View Grid Show Grid), so that the alpha is easier to see — on a flat white background, the color just looks lighter rather than transparent.
Figure 7-15: New levels of Alpha can be applied to Fills and Strokes and the modified swatches can be added to the Swatches panel for reuse.
Alpha transparency will result in more of a performance hit than a color tint,
You can apply blend modes to symbols to create different types of layered effects. We describe this new Flash 8 feature in Chapter 9, "Modifying Graphics."
Figure 7-16 shows the gradient editing controls in the Mixer panel, with the preview display for a linear gradient on the left, and for a radial gradient on the right. When working with linear gradients, the position of the color pointers on the Edit bar will
Figure 7-16: The Color Mixer panel displaying edit controls and preview for a linear gradient (top) and for a radial gradient (bottom)
The main Color Swatches panel and any of the fill Swatches pop-ups display the prebuilt linear and radial gradients that are included in the default palette. To edit an existing gradient swatch, just select it from the any of the fill Swatches pop-ups or select it from the main Color Swatches panel, and it will be loaded into the Mixer panel where the relevant controls will be displayed automatically. The other option is to start by choosing a gradient style from the central Color style menu on the Mixer panel to load a basic linear or radial gradient. After you create a custom gradient in a document, your settings will appear when you go back to the Mixer panel menu. To start with an unmodified default gradient, just select one from the fill Swatches palette. Figure 7-17 shows the two
Figure 7-17: You can select default gradient styles (and saved custom gradients) from any of the fill Swatches pop-ups, or set one of the basic grayscale gradient styles with the Color style menu in the Color Mixer.
The Fill Transform tool has been improved and is now called the Gradient Transform tool in Flash 8.
The colors in a gradient and the distribution of blending are adjusted by sliding the color pointers along the Gradient Edit bar in the Mixer panel. These pointers are the access points to the key colors that define the gradient. After you click on a pointer to make it active, you can assign the color that will be blended in its range, either by double-clicking to invoke the Swatches pop-ups or by picking a color in the color selection field. You can also use the value fields and the color slider controls to modify an assigned color in a gradient the same way as any solid color. Flash 8 provides more robust support for gradient creation. Although you probably won't ever need to exceed the old limit of 8 points, Flash 8 has
The Color proxy chips used to assign colors to gradient pointers in Flash MX 2004 have been
When you are editing a gradient fill, selecting a solid color swatch from the Color Swatches panel does not have the same effect as selecting a solid color swatch from the Swatches pop-up in the Color Mixer panel. Clicking a solid color swatch in the Color Swatches panel will replace your entire gradient in the Color Mixer with a solid fill style. Clicking a swatch from a Swatches pop-up on one of the gradient color pointers will only replace the color on the currently selected pointer — leaving the rest of your gradient intact.
You can adjust the pattern of the blend by clicking and dragging any of the color pointers to slide them to new positions along the Gradient Edit bar. You can add additional color pointers to the gradient range by clicking anywhere along the Gradient Edit bar. These additional pointers will create new control points in the gradient that can be dragged to new
Figure 7-18: A two-point radial gradient from white to black (on the left), modified by setting the left pointer to gray and adding a central color pointer set to white (on the right)
By selecting an element on the Stage, you can also apply or modify an existing gradient fill or stroke using the Mixer panel. When an item is selected in the Document window, you will see the current fill and stroke displayed in the Color Mixer panel. Any changes you make in the Color Mixer panel while the item is selected will be updated on the item dynamically. Remember to select Add Swatch from the options menu if you want to store the new gradient in the Color Swatches panel.
In Flash MX 2004, fills and strokes on items in the Document window are loaded into the Color Mixer panel by using the swatches pop-up in the Property inspector. In Flash 8, the workflow has been streamlined — the current fill (or stroke) of any selected item is automatically loaded in the Color Mixer panel.
To make it easier to see how a gradient looks in a selected shape, you can toggle off the display of the selection mesh by using Shift+Ctrl+E (Shift+ z +E).
If you need some new ideas for gradient styles, Macromedia Fireworks is a great addition to your tool kit. Flash 8 supports the import of Fireworks PNG files, and most filters and gradient styles added in Fireworks will be preserved and editable when the file is imported to Flash. Fireworks ships with a huge library of ready-made gradient styles, including simple but handy Rectangle and Contour styles and fancier ones such as Satin, Starburst, and Ripple. Some of these gradient styles are too complex for the Flash authoring environment to support, but you can import them as bitmaps and jump out to Fireworks to edit them if you need to. You can add Fireworks gradient styles that Flash supports to your Swatches panel and reuse or modify them. Now those same old shaded
As we mentioned previously, all the normal Color sliders and value fields will apply to control points on a gradient. You may have noticed already that this means you can add alpha to the blend range of any gradient. To create a soft transition between a bitmap or a
Import a bitmap into Flash and place it on the Stage; then lock the bitmap layer.
Create a new layer above the bitmap layer and
Open the Mixer panel and set the gradient style to radial, or select the default grayscale radial gradient from the fill Color Swatches panel. Set the stroke color to black, with a stroke height of 2. Leave the Overflow menu on the default (Extend) setting.
The new Overflow style menu for gradient and bitmap fills in the Flash 8 Color Mixer panel provides more control over fill rendering. Three Overflow settings determine how the edges of a gradient or bitmap image will be rendered if they need to extend beyond the bounding box of the original applied fill. We include more detailed coverage of these settings in Chapter 9, "Modifying Graphics."
Select the gradient layer and then use the Rectangle tool to drag out a rectangle on the Stage that is the same
Select the fill of the rectangle and then select the left (white) color pointer on the Gradient Edit bar and assign it a color of black (see Figure 7-21). Set the Alpha value on the left color pointer to 0 percent.
Press Shift+Ctrl+E (Shift+ z +E) to hide the selection mesh and adjust the position of the color pointers by sliding them along the Gradient Edit bar, until you like the way the blend looks on top of the photo (see Figure 7-22).
Figure 7-19: An imported bitmap placed on the Stage with a new layer above it for the gradient
Figure 7-20: Finished rectangle with a radial gradient fill and a black stroke of 2. The rectangle is dragged out to match the size of the photograph on the layer below.
Figure 7-21: Both color pointers assigned a color of black for the selected gradient fill
Figure 7-22: The final gradient can be previewed as the color pointer is moved to adjust the edges of the alpha blend.
If you applied the Drawing Object option when you drew the original gradient rectangle, you won't have to worry about turning off the selection mesh. The thin blue outline that shows up on a selected Drawing Object doesn't interfere with the live gradient preview like the
Select any gradient item (fill or stroke) with the Gradient Transform tool (in the Tools panel) and you will see the new edit handles that you can use to modify the center point, scale, and rotation of your gradient within the selected item. We describe the Gradient Transform tool in more detail in Chapter 9, "Modifying Graphics."
As you read through the steps in this example, you might have wondered why we assigned the same color to both color pointers; since one of the pointers is set to an alpha value of 0 percent, perhaps it doesn't matter which color is used? The answer is that you
create a "fade" effect with a radial gradient made from two different colors, but the blend will not be clean unless you use only one color. Although the end point of the gradient assigned an alpha value of 0 percent will be "clear," the
Another handy feature available in the Color Mixer panel is the Bitmap fill option. This option enables you to choose any bitmap, in the Library or elsewhere on your system, to use as a fill for
To apply a bitmap fill directly to an existing shape, perform the following steps:
Select the fill of a shape (or select a Drawing Object) with the Selection tool.
Open the Mixer panel and choose Bitmap from the Color style menu.
If you have bitmaps stored in your current document library, they will be available from the Bitmap Preview area of the Mixer panel. Simply click on the thumbnail of the bitmap that you want to apply and it will automatically fill the selected shape.
If you do not have any bitmaps available in the current document, selecting Bitmap from the Color style menu in the Mixer panel will launch the Import to Library dialog box, where you can browse your system and specify a bitmap to be imported and applied as a fill.
Figure 7-23 shows a selected shape with a bitmap fill applied from the available thumbnails in the Mixer panel Preview area.
Figure 7-23: A bitmap fill applied to a selected shape. The bitmap is
The appearance of a Bitmap fill will vary depending on how it is loaded (or assigned) to a specific item. We cover the various ways of loading Bitmap fills and the results you can expect in more detail in Chapter 9, "Modifying Graphics."