All pastes #409229 Raw Edit

Mine

public text v1 · immutable
#409229 ·published 2007-03-25 15:06 UTC
rendered paste body
Button.prototype.myPlay = function() {
	this.onRollOver = function() {
		mySound = new Sound(this);
		mySound.attachSound("click");
		mySound.start();
	};
};
func1 = function() {
if (_root["anim"+this._name.charAt(3)]._currentframe!=_root["anim"+this._name.charAt(3)]._totalframes) {
_root["anim"+this._name.charAt(3)].nextFrame();
} else {
	_root["anim"+this._name.charAt(3)].gotoAndStop ((_root["anim"+this._name.charAt(3)]._totalframes) - ((_root["anim"+this._name.charAt(3)]._totalframes) - 1)); 
};
};
func2 = function() {
if (_root["anim"+this._name.charAt(3)]._currentframe!=1) {
_root["anim"+this._name.charAt(3)].prevFrame();
} else {
	_root["anim"+this._name.charAt(3)].gotoAndStop (_root["anim"+this._name.charAt(3)]._totalframes);
};
};
func3 = function() {
_root["anim"+this._name.charAt(3)].play();
};
func4 = function() {
_root["anim"+this._name.charAt(3)].stop();
};
for (i=0; i<4; i++) {
_root["but"+i+String(0)].onRelease = func2;
_root["but"+i+String(1)].onRelease = func4;
_root["but"+i+String(2)].onRelease = func3;
_root["but"+i+String(3)].onRelease = func1;
for (z=0; z<3; z++){
_root["but"+i+String(z)].myPlay();
}
}