get Beatles mp3 cool The Final Destination video CD melodies Michael Jackson qualitive X-Men Origins: Wolverine avi best hot Knock You Down get Monsters, Inc. DIVX nice White Album CD2 hot buy ipod The Skeptic qualitive mp3 Drake USA hot State of Play

Banner
Flash color selection widget- using color transform

Flash color selection widget color trasform scriptThis is a Simple widget which enables the user to select the color for their chosen car, if you got in here without reading my previews articles on color manipulation and bitmap conversion, I recommend you go back and read them first.

Our goal in here is to re-create the concept which we created on my previews article about color manipulation, and import a class called color transform to make a dynamic color selection, we will be using the layer mask that we created on my bitmap conversion tutorial and the same Toyota Aygo as our model.

warning to all readers, I would not explain how to convert movie clip and such, I'm expecting that you are already familiar with those fundamentals.

So let start the tutorial ^^.

We need two objects here, the .EPS which contain our vector mask and the Toyota aygo.png which is the original image, and... what was that Aygo.png??.... oh I get it, it was a photoshop layer mask; which we used on our previews article, anyway just leave it there.

color selection widget for car purchase

Name our first layer ‘Toyota aygo', this will contain our original image which is Toyota aygo.png.

color selection widget for car purchase

and then create a new layer name it ‘color fill', grab your rectangular tool and cover the whole stage with a #330066 rectangle, then convert it to a movie clip, give a name and an instance name or ‘mc_fill'.

color selection widget for car purchase

Then select mc_fill, then on the property panel set alpha to 55% and change the blending mode to ‘add'.

color selection widget for car purchase

Then create a new layer name it ‘mask', drag our aygo.eps on stage and convert it to movie clip give him a name and an instance name of ‘mc_mask', then convert the layer to mask. (tip: holding down shift while draging an object on the stage will paste it on the center.)

color selection widget for car purchase

Now create another layer, name it ‘palette'. And create a small rectangle and convert it to a movie clip, name it ‘mc_green'. Of course I would ask you to change the fill color to green, alpha to 55% and blending mode to ‘add'.

color selection widget for car purchase

Then create a new layer call it ‘action'. This will be the layer where we will type down all actionscripts.

Press F9 and type down the following:

  1. import flash.geom.ColorTransform;
  2. mc_green.onRollOver = function() {
  3. var colorTransform:ColorTransform =
  4. mc_fill.transform.colorTransform;
  5. colorTransform.rgb = 0x015409;
  6. mc_fill.transform.colorTransform = colorTransform;

  7. }

 

You will have the same result as this one. Rollover your Mouse on the green palette.

Now that you have done the first one, you can repeat the process to make huge variety of colors.

 

 

 

 


Digg! Reddit! Del.icio.us! Mixx! Google! Live! Facebook! Technorati! StumbleUpon! Spurl! Newsvine! Blinklist! Furl! Blogmarks! Yahoo! Netvouz! Faves!

Comments (5)add
0
...
written by kris , March 22, 2009
I got some problem with the white palette. how did you manage the #ffffff color transform?
0
...
written by keruchan , March 22, 2009
the original color of our subject is white, so onRolloever instead of changing the color of our mc_fill, we will pull down the alpha to zero.

mc_fill._alpha = 0;

will do the job.


0
...
written by dan , March 27, 2009
I'm expecting you put this one to the next level by putting a bar instead of square palette.
0
...
written by keruchan , March 27, 2009
yes it's possible but I'll save that one , I have a plan for that ^^.
0
...
written by prada handbags , June 28, 2010
Your technology is so terrific!
I know an online store which has a lot of XX in this style, they are suit you very much,can reveal your personality better!
Go to have alook when some time left, there must be many surprises!,
Write comment
smaller | bigger

busy
 




Site Templates and Wordpress themes. Flash components and effects Convert image into vector Your ad here - Click for more info Your ad here - Click for more info Your ad here - Click for more info