|
|||||||
| Other Discussion and technical support for any other scripting methods. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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: Code:
on (release) {
stopAllSounds();
PE14Conv1e = new Sound();
PE14Convle.loadSound("file:///c:/Program Files/Sound Recording/AudioRecorder/NewSong52211.mp3");
PE14Conv1e.start(0, 0);
}
I did the same method on another button that calls server side mp3 file. However, this one works fine when I tested: Code:
on (release) {
stopAllSounds();
PE14Conv1d = new Sound();
PE14Conv1d.attachSound("PE14_1d");
PE14Conv1d.start(0, 0);
}
Thanks in advance, Janice |
|
#2
|
|||
|
|||
|
It seems nobody knows the answer! Try posting your question in the forums at flashkit.com.
http://www.flashkit.com/index.shtml Regards.
__________________
http://www.andrewbuntine.com |
|
#3
|
|||
|
|||
|
Thanks buntine,
This method works fine Code:
on (release)
{
stopAllSounds();
mySound = new Sound();
mySound.loadSound("file:///c:/program files/sound recording/audiorecorder/newsong52211.mp3", true);
mySound.start();
}
Thanks in advance, Janice |
|
#4
|
|||
|
|||
|
Hi Buntine,
I tried playing the mp3 files from both server and client side alternately and currently, it works fine. Though, there is a problem as, if one of the files does not exist, an error will occur and this will terminate the script without continuing playing the mp3s. The code is as below: Code:
on(release){
var iddiscussion = 1;
var numberFile = 4;
function discussion() {
server = new Sound();
trace("in new Sound");
server.attachSound("PE14_1d"+iddiscussion+".mp3");
server.start(0, 0);
server.onSoundComplete = function () {
client = new Sound();
client.loadSound("file:///c:/program files/sound recording/audiorecorder/test"+iddiscussion+".mp3", true);
client.onLoad = function(success) {
this.start();
}
client.onSoundComplete = function () {
iddiscussion++;
if (iddiscussion < numberFile) {
discussion();
}
}
}
}
discussion();
}
Thanks in advance, Janice Last edited by janice_2k4; 07-11-2004 at 11:26 PM. |
|
#5
|
|||
|
|||
|
Im sorry, but im not a flash-man. I am not familiar with Actionscript.
![]() The Web Site i posted above may be of more help for Flash programming related questions. Regards, Andrew Buntine.
__________________
http://www.andrewbuntine.com |
|
#6
|
|||
|
|||
|
Hi Buntine,
Its ok. Do you know any sites or people that could help me in this? Anyway, thanks for the replies. Have a pleasant day. Thanks, Janice |
|
#7
|
|||
|
|||
|
Yes, the guys at FlashKit will help you out. I posted the link in my first post.
www.flashkit.com Regards.
__________________
http://www.andrewbuntine.com |
|
#8
|
|||
|
|||
|
Thanks buntine. Have a nice day.
Janice |
|
#9
|
|||
|
|||
|
Having been featured on flashkit and post regularly in their forums, I'd rather recommend visiting were-here's forums for answers relating to actionscript.
|
|
#10
|
|||
|
|||
|
Thanks schizo. I will drop a thread at the site. Have a nice day.
Cheers, Janice |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|