Hi there
I have a simple question about functions.
I have a few scripts for my buttons, each button has its own script. I have also a script for colormodifications, But I do not want to copy that complete script in each button.
Here is a simplified version of the scripts for my buttons
but_bedrijf.onPress = function() {
gotoAndStop("mainmenu");
}
but_sectionalep.onPress = function() {
gotoAndStop("sectionalep");
}
but_buitenp.onPress = function() {
gotoAndStop("buitenp");
}
but_pauto.onPress = function() {
gotoAndStop("pauto");
}
Here is the function I’d like to be called in every script.
blueColor = function() {
var my_color:Color = new Color(this);
my_color.setRGB(0x46AAC2);
}
I would like that the button changes of color when I Pressed on it.
I know I should type in every script this code
blueColor();
But my complete set of buttons changes to blue, Isn’t there something we have to put between those ().
Thanx in advance