Combined Code
frame 1 {
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
this.loadText = Math.round(getPercent * 100) + '%';
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
}
frame 2 {
this.gotoAndPlay(1);
}
frame 3 {
function datloop() {
if (amor.position > 40000) {
amor.stop();
amor.start(20.3);
}
}
amor = new Sound();
amor.attachSound('datsong');
amor.start(20.3);
amor.onLoad = setInterval(datloop, 50);
stop();
}