
Added by roScripts on August-25-2007, 4:22 pm
// Button states
// Use: firstframe of movieclip _parent.buttonStates(_name);
// Result: first click turns button on, second click turns button off
//
function buttonStates(n) {
this[n].stop();
this[n].state = false;
this[n].onRollOver = function() {
this._parent[n].gotoAndStop(2);
};
this[n].onRollOut = this[n].onReleaseOutside = function () {
if (this._parent[n].state) {
this._parent[n].gotoAndStop(2);
} else {
this._parent[n].gotoAndStop(1);
}
};
this[n].onPress = function() {
this._parent[n].gotoAndStop(3);
this._parent[n].state = !this._parent[n].state;
};
this[n].onRelease = function() {
if (this._parent[n].state) {
this._parent[n].gotoAndStop(2);
} else {
this._parent[n].gotoAndStop(1);
}
};
}
Added by roScripts on March-26-2008, 5:14 pm
Added by roScripts on March-26-2008, 5:13 pm
Added by roScripts on March-26-2008, 5:09 pm
Added by roScripts on March-26-2008, 5:08 pm
Added by roScripts on March-26-2008, 5:07 pm