Home | Help Forums | Web Design Tutorials | Free Swishmax Downloads | All Downloads

 

 

Company

Home

Nework Details

Tutorials

SWiSH 2

SWiSHMax

Flash MX

PHP & MySQL

HTML / JScript

Adobe Photoshop

Corel Draw

Gimp

Miscellaneous

Downloads

Templates

Plugins

Fonts

Wallpapers

Free Images

Scripts and Codes

Products

E-Books

SWiSH BB

SWiSH Templates

SWiSH-DB Newsletter
Subscribe to our newsletter : GO
  Partners / Affiliates

   Swish Templates
   SWiSH Climax
   GimpTalk
   Idea Designs
   Sposatoettore
   Try Acai Berry Diet
   Download Free Ringtones
   Swishzone

Manage your site with Flax Article Content Management System
setRGB: Set up the RGB colour
Category : SWiSHMax | Level : Beginner | Language : English
Ask Question | Read Comments | Post tutorial | Previous | Next

Web www.swish-db.com

Download exampleTo reply to some requests arrived to me:
(I hope to be enough clear with my English)

setRGB: Set up the RGB colour

For the mean of the object "Color" is possible to plan a color RGB to a Target of
a movie. A common example of use is the possibility to choose the color of the
background of the movie:
On the background of the movie, there is a sprite with drawn a rectangle (white in
the beginning). When the user chooses the type of color to assign, the sprite
background recolor itself with the choice color comes.
We see like..
Before all we have to set the color RGB using the syntax "0xRRGGBB",
and during the creation is necessary to specify the Target to that the object does reference:

new Color(Target)

Then, it comes used the method setRGB to plan the color wanted.
For RED, for example is "FF0000" that becomes (0xFF0000) (as we can see on the sintax above)

Here how it appears the script of the button "red" :

on (release) {
colore = new Color(sfondo);
colore.setRGB(0xFF0000);
}


and so on for the colours that we want to use.
Our object must have the mask that allow the change of colours and so we have to select for the sprite
"Use bottom object as mask" (how we can see in the example below)

VIEW



All rights reserved - swish-db.com