...

View Full Version : Help with simple sound problem



pwesthead
08-07-2009, 05:52 PM
Hi
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)
{

SoundMixer.stopAll();
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));
s:play();
}

ps iam a newbie at actionscript



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum