janice_2k4
06-30-2004, 04:01 AM
Dear gurus and members,
I am a newbie in actionscript and other scripting. I wonder whether it is possible for actionscript to read mp3 files located on the client's computer. I have a flash button embedded on my website (online) that should play server side and client side mp3 files alternately. For example: Q1(server)-A1(client), Q2-A2...etc with just a click on a button.
The following is the code I tested to see if actionscript can play a client side mp3 file:
on (release) {
stopAllSounds();
PE14Conv1e = new Sound();
PE14Convle.loadSound("file:///c:/Program Files/Sound Recording/AudioRecorder/NewSong52211.mp3");
PE14Conv1e.start(0, 0);
}
I have placed the .mp3 file in the folder correctly but when I tested the movie and build swf file (without uploading to the server yet as there are some difficulties in uploading to my server these few days), it does not play the mp3.
I did the same method on another button that calls server side mp3 file. However, this one works fine when I tested:
on (release) {
stopAllSounds();
PE14Conv1d = new Sound();
PE14Conv1d.attachSound("PE14_1d");
PE14Conv1d.start(0, 0);
}
I have no idea how to solve the problem in playing client side mp3 files from the Flash button on my website. Looking forward t some reply soon.
Thanks in advance,
Janice
I am a newbie in actionscript and other scripting. I wonder whether it is possible for actionscript to read mp3 files located on the client's computer. I have a flash button embedded on my website (online) that should play server side and client side mp3 files alternately. For example: Q1(server)-A1(client), Q2-A2...etc with just a click on a button.
The following is the code I tested to see if actionscript can play a client side mp3 file:
on (release) {
stopAllSounds();
PE14Conv1e = new Sound();
PE14Convle.loadSound("file:///c:/Program Files/Sound Recording/AudioRecorder/NewSong52211.mp3");
PE14Conv1e.start(0, 0);
}
I have placed the .mp3 file in the folder correctly but when I tested the movie and build swf file (without uploading to the server yet as there are some difficulties in uploading to my server these few days), it does not play the mp3.
I did the same method on another button that calls server side mp3 file. However, this one works fine when I tested:
on (release) {
stopAllSounds();
PE14Conv1d = new Sound();
PE14Conv1d.attachSound("PE14_1d");
PE14Conv1d.start(0, 0);
}
I have no idea how to solve the problem in playing client side mp3 files from the Flash button on my website. Looking forward t some reply soon.
Thanks in advance,
Janice