WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Playing Sounds, Dave, January 30, 2005
     Re:Playing Sounds , Dave, February 8, 2005
     Re: classid's?, Dave, January 30, 2005

Subject: Playing Sounds From: Dave Date: January 30, 2005
... Ya, another question from me

I'm writing a music player program... Ive figured out how to play, pause, stop, and call a function when the current song ends with out using any "intervals" or "timeouts" using the below code in a seperate html file. Then calling them through an inline frame from the parent window.
I'm still not really satisfied because I still can't figure out how to "seek" to a certain point in the sound file.

<object ID="BGMUSIC" style="height:0; width:0" classid="clsid:05589FA1-C356-11CE-BF01-00AA0055595A">
<param name="FileName" value="">
<param name="ShowDisplay" value=0>
<param name="AutoStart" value=0>
<param name="ShowControls" value=0>
<param name="ShowTracker" value=0>
</object>
<script>
var wasJSinit=0
var lastState=-1
window.loadFile= function(fn){BGMUSIC.FileName=fn; lastFile=fn}
window.stop=     function(){wasJSinit=1; BGMUSIC.Stop(); wasJSinit=0}
window.play=     function(){wasJSinit=1; BGMUSIC.Run(); wasJSinit=0}
window.pause=    function(){wasJSinit=1; BGMUSIC.Pause(); wasJSinit=0}
window.volume=   function(n){if (n>=100){n=100} BGMUSIC.volume=-(100-Math.abs(n))*100}
window.balance=  function(n){BGMUSIC.balance=n*100}
window.getCS=    function(){return BGMUSIC.CurrentState}
</script>
<script for="BGMUSIC" event="statechange">
if (!wasJSinit && BGMUSIC.CurrentState==0 && lastState!=-1){parent.playNext()}
lastState=BGMUSIC.CurrentState
</script>

Could somebody tell me how to get and set the position of the file?

Thanks,   
-Dave



Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX