Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13

Thread: how big?

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question how big?

    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?
    ez
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #3
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    depends, how are you trying to accomplish retrieving this information (language)? or was that part of the question?

    short of just looking at your files and seeing it that way, i suppose your dealing with dynamic content ....(?)

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    any ideas?
    ez
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.......
    ez
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    two word answer is 'my ignorance'
    ez
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can i somehow make the play of sound an event and the use
    event.Unload?
    ez
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #9
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'll leave that to someone better qualified to answer that as I use Flash for this type of thing... sorry!
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #10
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks webmarkart.. i appreciate your suggestion
    ez
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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">
    <HEAD>
    <TITLE>mediaDur Property</TITLE>
    <?IMPORT namespace="t" implementation="#default#time2">

    <STYLE>
    .time{ behavior: url(#default#time2);}
    </STYLE>
    </HEAD>

    <BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
    LINK="#000000" VLINK="#808080" ALINK="#000000">

    <t:audio id="m1" style="position:absolute;top:50px;height:100px"
    src="s9.wav" />

    <SPAN style="position:absolute;top:165px;" id="mediaDur1">Media duration:</SPAN>

    <P style="position:absolute;top:190px;">
    <BUTTON id="b1" onclick="mediaDur1.innerText='Media duration: ' +
    m1.mediaDur + ' seconds'">Click here for media's duration</BUTTON>
    </P>
    </BODY>
    </HTML>



    just if anyone else is ever interested..
    ez
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #12
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    some of that just flew right over my head.

  • #13
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Its over my head too .. its a direct (almost) cut and paste from MSDN
    It works for other media such as video too check out the source



    http://msdn.microsoft.com/workshop/a...usic_entry.asp
    ez
    Last edited by ez4ne12c; 04-07-2003 at 04:31 AM.
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •