|
 |
|
|
|
|
|
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
|
|
|
|