Declaring & Defining
Line 1 : Declaring the functionmyColorizing(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.
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 ObjectmyObjTransform = 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 |
| » Author |
| No information about the author has been provided |
| » Download |
| Download the files used in this tutorial. |
| Download (8 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


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