I know i can determine how big an image is in pixels..
how do i detemine how long a sound file is in seconds?
can this be done for wav au and mp3?
04-05-2003, 06:37 AM
for an image: assuming you're not using an image editor, you can open it in IE and right click on it and click "properties". That will give you the height and width in pixels.
for the sound: you should be able to tell just by playing it in your default media player.
04-05-2003, 06:38 AM
depends, how are you trying to accomplish retrieving this information (language)? or was that part of the question? :D :D
short of just looking at your files and seeing it that way, i suppose your dealing with dynamic content ....(?)
04-05-2003, 06:59 AM
What i need to do is change an image on the page when the sound stops..
so i would like to no how long the sound file is so that i can just set a timeout..
maybe there is another way but i have checked on the EMBED tag and theres not alot to work with there..
im guessing i cant use an onUnload in the embed..
i need the time of the sound OR an onDonePlayingSound event
04-05-2003, 07:01 AM
oh as for language im using IE with activeX controls so i guess i could look at the file size and make a guess.. i was hoping to nail it down a bit better than that.......
04-05-2003, 07:02 AM
you're going to run into problems with that because it will take different computers different lengths of time to load the sound. Why not do it in Flash so you can control the timeline very easily?
04-05-2003, 07:06 AM
two word answer is 'my ignorance' ;)
04-05-2003, 07:08 AM
Can i somehow make the play of sound an event and the use
04-05-2003, 07:12 AM
I'll leave that to someone better qualified to answer that as I use Flash for this type of thing... sorry!
04-05-2003, 07:18 AM
Thanks webmarkart.. i appreciate your suggestion
04-07-2003, 02:53 AM
Well i did it in js thanks to MSDN
this seems to work..
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<?IMPORT namespace="t" implementation="#default#time2">