.
Mouse move opacity change function
This is actually a very simple flash function, but it explains a lot, and if you don't know much about functions and how to make them, this simple flash example might be the one to make you realize how easy it is. With just a few lines of code you will see how to make an objects opacity, also called alpha state, change relative to the mouse y axis position.
Of cause the first thing you should do it to open a new document, then draw some graphic on the stage, this graphic is what you want to apply this function to, as you can see I made a tree, you can find some vector graphics to use in one of my previous posts where you can download some free vector graphics, you just need to export them to flash from illustrator.
Now convert your graphic to a movie clip by right click and choose convert to symbol.
Go to the properties settings as shown below, and give your new movie clip symbol an instance name, I choose tree as you see.

Now hit F9 on your keyboard, this will show you the action script panel, in here you need to type in the following code. (Ignore the green text when typing in the code, this is explanation text)
mouse_do = setInterval(Achange,30)
//declaring the alpha changing function
function Achange() {
//set the square shape alpha value to change to
//the same value as you mouse Y axis position.
tree._alpha = Math.round(_root._ymouse/200*100);
}
Now test your movie, move the mouse up and down
Admin Bob says: 2008-03-31
Anon says: 2008-03-31
Kryztina says: 2008-03-26
Admin bob says: 2008-02-15
Loriane says: 2008-02-14
mike says: 2008-02-09
Admin bob says: 2008-01-27
divya says: 2008-01-25
fitz says: 2008-01-23
James says: 2008-01-23
Kyle says: 2008-01-23
Kyle says: 2008-01-23
moni says: 2008-01-12
Ben says: 2008-01-11
Rylie says: 2008-01-09
chris says: 2007-12-19
Akmal says: 2007-12-17
javeed says: 2007-12-16

