First time here? First time here? Newsletter Signup Newsletter
Search tutorials
Author: Ofir Avrahamov | Website: http://

The Color Parameters

Lines 4 - 11 : Defining the Color Variables
myObjTransform.Ra = myred;
myObjTransform.Rb = myredOffset;
myObjTransform.Ga = mygreen;
myObjTransform.Gb = mygreenOffset;
myObjTransform.Ba = myblue;
myObjTransform.Bb = myblueOffset;
myObjTransform.Ab = myAlpha;
myObjTransform.Ab = myAlphaOffset;

These are the 8 parameters that specify the percentage and offset values for the red, green, blue, and alpha (transparency) components of a color, entered in a 0xRRGGBBAA format - each color component recieves the value we sent to the function. Our object has 8 properties, 1 for each color component - the names (ra,rb,ga,gb,ba,bb,aa,ab) are reserved words - we can't "invent" our own color properties. If you'll look carefully you'll see the reasoning behind these names - there are RGB colors (and Alpha) - the exact values are called (RGBA)+a and they are measured between -100 to 100, (0 is none color, 100 is full color) and the offset values are called (RGBA)+b and they are measured between -255 to 255 (0 is no influence at all, 255 is full influence, -255 is reversed influence.

The parameters for a color transformobject are defined as follows:

ra is the percentage for the red component (-100 to 100).
rb is the offset for the red component (-255 to 255).
ga is the percentage for the green component (-100 to 100).
gb is the offset for the green component (-255 to 255).
ba is the percentage for the blue component (-100 to 100).
bb is the offset for the blue component (-255 to 255).
aa is the percentage for alpha (-100 to 100).
ab is the offset for alpha (-255 to 255).

Line 12 : The Bottom Line

This is the final and most important line - this line connects the virtual object to our real object using the "setTransform" method that can be found in the "color" submenu in the "object" menu.

» Level Advanced

Added: 2000-11-16
Rating: 8 Votes: 53
(10 being the highest)
» Author
No information about the author has been provided
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.