code in frame 1 layer 1

//soundDemo
//illustrates how to add code-driven sound to 
//games
//Andy Harris, 4/05

//assumes a file called "crash.wav" has been loaded into library
//with link settings changed to "export for actionscript"

init();

function init(){
  //create a sound object
  sndCrash = new Sound();
  sndCrash.attachSound("crash.wav");
} // end init

btnCrash.onRelease = function(){
  sndCrash.start();
} // end