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

Declaring & Defining

Line 1 : Declaring the function

First we need to declare the new function by naming it "myColorizing" and naming the 8 parameters (the color components) that have to be passed to it.

Note: Not all functions require parameters but this one does. The order of the variables is important - you must maintain the order defined in the function itself (i.e. if your function is myMinus(A,B) and calculates (A - B) inside it, then if you don't maintain the order of the variables when you call it, it will calculate (B - A). This will result in errors.)

When we will call the function, the 8 values will be passed to it and look something like this: (of course you will not actually see this at run-time, this is only to help you visualise the passing of parameter values)

Line 2 : Defining the new Color
myObjColor = new color(_root.myObject);

In this line we define a new color characteristic to our movieclip ("myObject") and assign it the name "myObjColor". The "new color()" constuctor can be found under the "color" submenu inside the "objects" menu in the toolbox. This is what gives our movieclip the ability to change its color.

Line 3 : Defining the new Object
myObjTransform = new object();

This is the virtual object I mentioned before - the "new object()" can be found in the "object" submenu under the "objects" menu in the toolbox. We must define a new object because we want to influence its properties - and if there is no object, there are no properties to modify.

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