First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing! | Flash Jobs
Search tutorials
Author: Ofir Avrahamov | Website: http://

Declaring & Defining

Line 1 : Declaring the function
myColorizing(myred,myRedOffset,mygreen,myGreenOffset,
     myblue,myBlueOffset,myAlpha,myAlphaOffset){

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)

myColorizing(100,170,0,0,0,-160,100,0)
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!

Comments

  • 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: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
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: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.