AS3 Gradient Slider
12 years ago
Recently I starting working on a little project in Flash ( I will post on this later when I am ready to show it) which required some kind gradient slider like what you would see in the Flash IDE and Illustrator etc, where you can move colours around and add or remove them form the gradient. After a short search I couldn’t find any decent Flash examples, Avairy had a pretty good one although not quite what is was after and I would not be able to find out how it was done. So instead I learnt how to use the ‘beginGradientFill’ method of the drawing API and implemented my own version. I think I’ve come up with a pretty good solution, though not the easiest to incorporate into another project – but it can be done! You can download the source and have a go below.
BenAuthor: Ben Foster Date: April 17, 2010