Configuring the Flash CS3 ColorPicker Component

You can insert an instance of the ColorPicker component into your movie programmatically, but you can also drag it onto the Stage at authoring time. In our simple tutorial, we did the latter. In order to access components, open the Component panel. (Go to Windows in the uppermost menu and select Components.)
    Window >> Components:

Select the ColorPicker component and drag it onto the Stage. With the instance on the Stage selected, go to the Properties panel. With Properties tab selected, give your instance the name cpColor. Select Parameters tab. In our example, we left the default value of black for the color with which the picker should open. We changed the parameter showTextField to 'false' from the default of 'true' (for a cleaner look of the final movie).

During authoring time, we created a dynamic text field, with the instance name sizeBox:

We also created by hand an arrow button and put two instances on the Stage: btnUp and btnDown. (btnDown was obtained by Modify >> Transform >> Flip Vertical.) We created and placed on the Stage the erase button with the name btnErase.


Download the well-commented fla file for the swf displayed above.

On the next page of this tutorial, we discuss the code behind our drawing example.

Back to Basic Tutorials              Back to Flash and Math Home

We welcome your comments, suggestions, and contributions. Click the Contact Us link below and email one of us.

Adobe®, Flash®, ActionScript®, Flex® are registered trademarks of Adobe Systems Incorporated.