Declaring & DefiningLine 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.
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|
Rating: 8 Votes: 53
|No information about the author has been provided|
|Download the files used in this tutorial.|
|Download (8 kb)|
|More help? Search our boards for quick answers!|