brutteforcce
Technical User
I have this code...
for (i=1; i<6; i++) {
this["buton"+i].onRollOver = function() {
var n = this._name.substring(5);
this._parent["txt_"+n].gotoAndPlay("txt_init");
this._parent["disp_"+n].gotoAndStop("disp_init");
};
this["buton"+i].onRollOut = function() {
var n = this._name.substring(5);
this._parent["txt_"+n].gotoAndPlay("trans_txt");
this._parent["disp_"+n].gotoAndPlay("trans_disp");
};
this["buton"+i].onRelease = function() {
var n = this._name.substring(5);
this._parent["txt_"+n].gotoAndStop("trans_txt");
this._parent["disp_"+n].gotoAndStop("trans_disp");
};
}
If I release the buton it should remain like that until I release another button and when I release another button the action from the on roll over should play for the button that it is pressed...
So if I release button2 it should stay in that way until I release another button... If I release after button3, the actions from the on roll over should start for button2...
How can I make this for all buttons just with a function or something that should work for any 2 buttons ( the button that was released first and the button released second, after the second was released it becomes the first)...
Please help!!!
stop();
for (i=1; i<6; i++) {
this["buton"+i].onRollOver = function() {
var n = this._name.substring(5);
this._parent["txt_"+n].gotoAndPlay("txt_init");
this._parent["disp_"+n].gotoAndStop("disp_init");
};
this["buton"+i].onRollOut = function() {
var n = this._name.substring(5);
this._parent["txt_"+n].gotoAndPlay("trans_txt");
this._parent["disp_"+n].gotoAndPlay("trans_disp");
};
this["buton"+i].onRelease = function() {
var n = this._name.substring(5);
this._parent["txt_"+n].gotoAndStop("trans_txt");
this._parent["disp_"+n].gotoAndStop("trans_disp");
};
}
If I release the buton it should remain like that until I release another button and when I release another button the action from the on roll over should play for the button that it is pressed...
So if I release button2 it should stay in that way until I release another button... If I release after button3, the actions from the on roll over should start for button2...
How can I make this for all buttons just with a function or something that should work for any 2 buttons ( the button that was released first and the button released second, after the second was released it becomes the first)...
Please help!!!
stop();