Sunday, 11 October 2009

ColourPicker component in Actionscript 3

The colour picker component displays a list of colours squares called swatches which the user can select a colour from. Initially, this component only displays a single colour on a square button. However, when this button is selected, a panel appears to display the list of colours available.

I have previously written three examples that use the colour picker component. The first one is a drawing application which changes the line colour, when another colour is selected from the picker component. This drawing application also has the option of changing the line thickness using the slider component.

The second example changes the colour of a movie clip. This examples use the colorTransform class to apply the colour to the movie clip.

The third example limits the colours in the colour picker component using the 'color' properties. You can set any amount of colours in the swatch as you wish. I have limited the colours to red, green, blue and yellow.

For more information on all the colour component properties and methods, checkout the AS3 colorPicker component reference.


  COPYRIGHT © 2014 · ILIKE2FLASH · Theme by Ourblogtemplates

Back to TOP