I want to code better, but am not sure what the names are for what I’m trying to do, so I can’t really search on it.
I want to make my menu items into a function, so it’s faster / smaller code. How would I do that? Currently I have:
main_menu.work_button.onRollOver = function(){
main_menu.work_button.gotoAndStop(2);
}
main_menu.work_button.onRollOut = function(){
main_menu.work_button.gotoAndStop(1);
}
Which works fine. But I’d prefer it to be something like:
main_menu.this.onRollOver = function(){
main_menu.this.gotoAndStop(2);
}
main_menu.this.onRollOut = function(){
main_menu.this.gotoAndStop(1);
}
So I only have to code the function once instead of 5 times for each menu item…