I have a movie with 5 buttons in it. Now, when a button is rolled over, it has an on state, and when clicked, it has an inactive state. Instead of writing alot of redundant code, I’m trying to see if I can simplify it. Here is what I have:
//active/inactive
function active (navClip) {
if (this.hitTest = true) {
navClip.onEnterFrame = function () {
this.enabled = false;
};
} else if (this.hitTest = true) {
navClip.onEnterFrame = function () {
this.enabled = true;
};
}
}
// button code
myBtn1.onRelease = function () {
active (myBtn1);
goToAndPlay some clip I have on stage
};
myBtn2.onRelease = function () {
active (myBtn2);
goToAndPlay some clip I have on stage
};
All AS is in the root, first frame. Any help would be GREATLY appreciated!!
Well, to answer the question, no that is not recursive… A recursive function basically calls itself repeatedly until something stops it… I’m not entirely sure what you’re doing, but this might help:
This works great, Thank You. It doesm’t seem to send the ‘myBtn’ clips back to their default speces… in other words, they stay on “[COLOR=#FF0000]myFrameLabel” [COLOR=Black]once they’ve been clicked…