AS Reference  :  Notes Index  :  Resources  :  About/Contact  :  Downloads

Make and edit gradients

Gradients are applied to fill objects. Fill options include solid color, linear gradient, radial gradient or bitmap. Linear and radial gradients can be made up of just two endpoint colors, or a whole range of colors. Each color in the gradient can have its transparency (alpha) set anywhere between 0 and 100%. If several gradients are to be used in a movie, it's often a good idea to open both the swatch panel (where solid colors and gradients may be saved) and the color mixer (where gradients are created/edited). In the picture above, they are open and docked to the right of the stage.

Create a gradient

A gradient is defined in the color mixer panel and applied with the paint bucket tool (or automatically if the object is already selected and the fill is changed in the color mixer). Select linear or radial from the dropdown box in the Color Mixer. The gradient bar will appear with two endpoints. More color points may be added by clicking along the gradient bar, or removed by dragging them away. The color of each point may be specified by clicking on it doing any of the following:

To save a gradient swatch, just click in the bottom row of the Color Swatches panel.

Modifying a gradient

Once a gradient has been applied to a fill object, its size and/or orientation may be changed with the fill transform tool (the blue gradient rectangle with arrows over it, circled in yellow at left). Select the fill transform tool, click the gradient on stage, and symbols like those in the picture above will appear. Their functions (rotate, size, move center) are as marked.

Intro
Flash: What & How
Example Sites
Create
Draw, Edit Shapes
Gradients
More Drawing Tips
Import
A Sample
Animate
Frames, Keyframes
Motion Tweens
More Motion Tweens
Shape Tweens
Masks
Control
Stop/Replay
Movieclips Intro
Movieclip Reference
Site Structure 1
Slideshow Movieclip
Contact Form
Scroll Resume
Preloader
Site Structure 2
Publish
Display Options
Player Detection
Optimize
AS 2.0 Basics
Intro to Syntax
Playhead Commands
Playhead Cmds 2
Coded Tween
onEnterFrame
Intro to Classes
Declare/Assign
Comments, Trace
Simple Data Types
Arrays & Objects
Code Blocks
Operators
Beyond Buttons
Code Structure
Toggle Controls
Group of Buttons
Drag and Hit
Distort Magnifier
Scroll Text
Bee Game
Dart Shooter
Sound Control
Easing Slider
Easing Slider 2
Components Intro
Timers & Delays
Dynamic Content
Intro
Drawing API
Create Text
Attach Movieclips
Easing Slider 3
Easing Slider 4
Load jpg/swf
Sliding Viewer
Preload swf
XML
Easing Slider 5
Server Comm
LoadVars (w/ PHP)
AS - PHP Lookup
Text File
Database 1:LoadVars
Database 2:Remoting
Read from directory
AS 2.0 Classes
Intro
Math
Key
Date
Color
EventDispatcher
New Samples
Pie Chart
Event-model Emailer
Tween Sequence
Fuse Sequence
SVG in Flash
Bitmap Topo
SWF as Data Holder
Two-level Menu
Yahoo! Flash Maps
Class-based Game
ASTB Samples
Disclaimer
3D Outlines
Bounce Collide
Address Book
Save Drawings
Home  :  Notes Index  :  Resources  :  About/Contact  :  Downloads