dcell
February 27th, 2003, 10:09 AM
Hiya,
I'm a semi-newbie and could sure use some help.
I have 4 invisible buttons that all do basically the same thing. I am learning how to consolidate my code using functions and I'm stuck on this one. I am using onRollover, on Rollout and onReleases in a frame actionscript. The code is below for 2 of the buttons.
mission_btn.onRollOver =function(){
mission_mc.gotoAndPlay("on");
}
mission_btn.onRollOut=function(){
mission_mc.gotoAndPlay("off");
}
mission_btn.onRelease = function(){
sectionLoader ("mission")
}
facilities_btn.onRollOver =function(){
facilities_mc.gotoAndPlay("on");
}
facilities_btn.onRollOut=function(){
facilities_mc.gotoAndPlay("off");
}
facilities_btn.onRelease = function(){
sectionLoader ("facilities")
}
is this enough info to help me change these events into a function?
or should I just continue with this method for the other buttons?
Thanks for the insight!
David
I'm a semi-newbie and could sure use some help.
I have 4 invisible buttons that all do basically the same thing. I am learning how to consolidate my code using functions and I'm stuck on this one. I am using onRollover, on Rollout and onReleases in a frame actionscript. The code is below for 2 of the buttons.
mission_btn.onRollOver =function(){
mission_mc.gotoAndPlay("on");
}
mission_btn.onRollOut=function(){
mission_mc.gotoAndPlay("off");
}
mission_btn.onRelease = function(){
sectionLoader ("mission")
}
facilities_btn.onRollOver =function(){
facilities_mc.gotoAndPlay("on");
}
facilities_btn.onRollOut=function(){
facilities_mc.gotoAndPlay("off");
}
facilities_btn.onRelease = function(){
sectionLoader ("facilities")
}
is this enough info to help me change these events into a function?
or should I just continue with this method for the other buttons?
Thanks for the insight!
David