4 Press "F9 " para abrir la ventana "Acciones" e inserte el siguiente código " playBtn . "
Var songClip : Sound = new Sound () ;
var answerClip : Sound = new Sound () ;
songInPlay var ;
//desactivar los botones
song0 . enabled = song1.enabled = song2.enabled = false;
playBtn.onRelease = function ( ) {
r = random ( 3 ) ;
songInPlay = " canción" + r ;
songClip.attachSound ( songInPlay ) ;
songClip.start ();
//activar botones canción de
song0.enabled = song1 . enabled = song2.enabled = true;
song0.onRelease song1.onRelease = function
} = song2.onRelease = () {< ;
trace ( songInPlay ) br>
if ( songInPlay this._name == ) {
answerClip.attachSound ( " grande") ;
} else {
answerClip.attachSound ( " buzz "); }
answerClip.start ();
//deshabilitar botones
song0.enabled = song1.enabled = song2.enabled = false; .
}
5
Elige "Control" y " probar película " en el menú superior para probar el juego