dude.gotoAndStop(1);
//call functions to show angles of dude
top.onRollOver = function() {
dude.angle(3);
};
bottom.onRollOver = function() {
dude.angle(1);
};
right.onRollOver = function() {
dude.angle(4);
};
left.onRollOver = function() {
dude.angle(2);
};
//call functions to show animation of dude
top.onMouseUp = function() {
dude.fart(3);
};
bottom.onMouseUp = function() {
dude.fart(1);
};
right.onMouseUp = function() {
dude.fart(4);
};
left.onMouseUp = function() {
dude.fart(2);
};
stop(<
//methods for dude
function angle(x) {
if (x == 1) {
this.gotoAndStop(1);
} else if (x == 2) {
this.gotoAndStop(2);
} else if (x == 3) {
this.gotoAndStop(3);
} else if (x == 4) {
this.gotoAndStop(4);
}
}
function fart(z) {
if (z == 1) {
front.gotoAndPlay(1);
}
if (z == 2) {
leftquarter.gotoAndPlay(1);
}
if (z == 3) {
rear.gotoAndPlay(1);
}
if (z == 4) {
rightquarter.gotoAndPlay(1);
}
}
stop();
|