Combined Code
frame 1 {
sya = 0;
}
frame 5 {
rand = Math.floor(Math.random() * 4);
if (rand == 0) {
var sound_obj = new Sound();
sound_obj.attachSound('fua');
sound_obj.start();
} else {
if (rand == 1) {
var sound_obj = new Sound();
sound_obj.attachSound('yan');
sound_obj.start();
} else {
if (rand == 2) {
var sound_obj = new Sound();
sound_obj.attachSound('an');
sound_obj.start();
} else {
if (rand == 3) {
var sound_obj = new Sound();
sound_obj.attachSound('nltu01');
sound_obj.start();
}
}
}
}
}
frame 16 {
if (sya >= 5) {
gotoAndPlay('s2');
} else {
sya += 1;
gotoAndPlay('s1');
}
}
frame 135 {
gotoAndPlay('ka' add random(2));
}
frame 154 {
rand = Math.floor(Math.random() * 4);
if (rand == 0) {
var sound_obj = new Sound();
sound_obj.attachSound('toiki01');
sound_obj.start();
} else {
if (rand == 1) {
var sound_obj = new Sound();
sound_obj.attachSound('toiki01');
sound_obj.start();
}
}
}
frame 176 {
gotoAndPlay('ka' add random(2));
}
frame 195 {
rand = Math.floor(Math.random() * 4);
if (rand == 0) {
var sound_obj = new Sound();
sound_obj.attachSound('toiki01');
sound_obj.start();
} else {
if (rand == 1) {
var sound_obj = new Sound();
sound_obj.attachSound('toiki01');
sound_obj.start();
}
}
}
frame 216 {
gotoAndPlay('ka1');
}