View Full Version : Help with simple sound problem

08-07-2009, 04:52 PM
i have been trying to write a simple bingo script i have found a simple tutorial
which plays a random number and plays a mp3 sound when i click the button to randomly pick number it picks the number ok but doesn't play any sound.

this is the error i get
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at sound_fla::MainTimeline/playSound()

here is the actionscript code

button.addEventListener(MouseEvent.CLICK, playSound);

function playSound(e:Event)

var num:Number = Math.ceil(Math.random()*4);
bigNum.text = num.toString();
var path:String = "sound" + bigNum.text + ".mp3";
var s:Sound = new Sound(new URLRequest(path));

ps iam a newbie at actionscript