
Welcome Guest
|
#1
|
|||
|
|||
|
button to play random number +sound help
Hi
i have just followed a tutorial on random number which plays mp3 files, so if random number is 3 it plays sound file sound3.mp3 and so on. the tutorial can be seen here http://www.webdesign.org/web/flash-&...cs3.14609.html the problem is when i click the button i get a different number but no sound, i keep getting this error. Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error. at sound_fla::MainTimeline/playSound() i have loaded all the mp3 files into the libary can't seem to find the problem. iam new to actionscript please help here is my actionscript code. 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();}
|
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| can't get soundclip to play when i click on a button (movieclip) | thh022 | Flash MX 2004 |
1 | 04-09-2006 01:06 PM |
| How to Play sound? | AjAy2 | Sound and Music |
1 | 04-04-2006 02:12 AM |
| play all button | Captain Kirk | Flash MX ActionScript |
0 | 07-17-2005 01:41 AM |
| flash does not play sound | hippobean | Newbies |
1 | 06-06-2005 11:17 AM |
| On/Off Sound Button Problem | modeman | Newbies |
0 | 01-28-2005 05:28 PM |





