Forum Moderators: open
But I have a problem with my flash. I have defined a function, and I would like to use that function on the rollOver state of a button, in order to make the button fade in. I'd rather not be using tweens.
This is my code so far (shortened):
function fadeIn (instance) {
while (instance._alpha < 100) {
instance._alpha += 20;
}
}
btn_name._alpha = 40;
btn_name.onRollOver = fadeIn(instance_name);
The problem that I get is that when I roll over the button, the alpha isn't incremented. It is set at 119.53125 straight away.
Maybe I'm referencing the function incorrectly, I don't know. But this is really frustrating me. If anyone can help, I would really appreciate it.
Thanks
*g