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('a02');
sound_obj.start();
} else {
if (rand == 1) {
var sound_obj = new Sound();
sound_obj.attachSound('aa03');
sound_obj.start();
} else {
if (rand == 2) {
var sound_obj = new Sound();
sound_obj.attachSound('a03');
sound_obj.start();
} else {
if (rand == 3) {
var sound_obj = new Sound();
sound_obj.attachSound('aa04');
sound_obj.start();
}
}
}
}
}
frame 14 {
if (sya >= 5) {
gotoAndPlay('s2');
} else {
sya += 1;
gotoAndPlay('s1');
}
}
frame 147 {
gotoAndPlay('ka' add random(2));
}
frame 161 {
rand = Math.floor(Math.random() * 3);
if (rand == 0) {
var sound_obj = new Sound();
sound_obj.attachSound('toiki01');
sound_obj.start();
}
}
frame 184 {
gotoAndPlay('ka' add random(2));
}
frame 185 {
gotoAndPlay('ka' add random(2));
}
frame 199 {
rand = Math.floor(Math.random() * 3);
if (rand == 0) {
var sound_obj = new Sound();
sound_obj.attachSound('toiki01');
sound_obj.start();
}
}
frame 222 {
gotoAndPlay('ka1');
}