Nick Toye
06-06-2005, 04:24 PM
Hi,
I've just returned to Flash after a while and I have decided to have a go at using more logical actionscript.
What I want to know is can I set the color of a rollOver just by calling a function?
This is what I have currently:
this.onRollOver = function(){
var buttonColor = new Color(_root.aboutBtn.drop.historyBtn.history_image );
buttonColor.setRGB(0xFFFFFF);
}
this.onRollOut = function(){
var buttonColor = new Color(_root.aboutBtn.drop.historyBtn.history_image );
buttonColor.setRGB(0xCCCCCC);
}
But I want to be able to declare the function initially, and then just call it whenever I need to instead of having to write that code again.
I'm sure it is simple, i'm just not entirely sure on the parameters, i think I need to put in the target clip but like I say I'm not sure.
Thanks in advance
I've just returned to Flash after a while and I have decided to have a go at using more logical actionscript.
What I want to know is can I set the color of a rollOver just by calling a function?
This is what I have currently:
this.onRollOver = function(){
var buttonColor = new Color(_root.aboutBtn.drop.historyBtn.history_image );
buttonColor.setRGB(0xFFFFFF);
}
this.onRollOut = function(){
var buttonColor = new Color(_root.aboutBtn.drop.historyBtn.history_image );
buttonColor.setRGB(0xCCCCCC);
}
But I want to be able to declare the function initially, and then just call it whenever I need to instead of having to write that code again.
I'm sure it is simple, i'm just not entirely sure on the parameters, i think I need to put in the target clip but like I say I'm not sure.
Thanks in advance