/*
function playBgMusic(){
    let instance = createjs.Sound.play("fondomusica1");  // play using id.  Could also use full source path or event.src.
    instance.on("complete", this.handleComplete, this);
    instance.play("fondumusica1", {loop:-1});
    instance.volume = 0.1;
}
*/

console.log("Parametrización cargada");

function playDialog(dialog){
	stopOvaAudio();
	switch (dialog){
        case "dialogo1_txt1":
            playSound("audio1");
            break;
        case "dialogo1_txt2":
            playSound("audio2");
            break;
        case "dialogo1_txt3":
            playSound("audio3");
            break;
		case "dialogo2_txt1":
            playSound("audio4");
            break;
        case "dialogo2_txt2":
            playSound("audio5");
            break;
        case "dialogo2_txt3":
            playSound("audio6");
            break;
		case "dialogo3_txt1":
            playSound("audio7");
            break;
        case "dialogo3_txt2":
            playSound("audio8");
            break;
        case "dialogo3_txt3":
            playSound("audio9");
            break;
		case "dialogo3_txt4":
            playSound("audio10");
            break;
		case "dialogo4_txt1":
            playSound("audio11");
            break;
        case "dialogo4_txt2":
            playSound("audio12");
            break;
        case "dialogo4_txt3":
            playSound("audio13");
            break;
		case "dialogo5_txt1":
            playSound("audio14");
            break;
        case "dialogo5_txt2":
            playSound("audio15");
            break;
		case "dialogo6_txt1":
            playSound("audio17");
            break;
        case "dialogo6_txt2":
            playSound("audio18");
            break;
        case "dialogo6_txt3":
            playSound("audio19");
			break;
		case "dialogo6_txt4":
            playSound("audio20");
			break;
		case "dialogo6_txt5":
            playSound("audio21");
			break;
		case "dialogo7_txt1":
            playSound("audio22");
            break;
        case "dialogo7_txt2":
            playSound("audio23");
            break;
        default: 
			playSound("audio1");   
    }
}

function stopOvaAudio(){
	createjs.Sound.stop();
}