SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    <EMBED> tag question

    Hi,

    I have multiple <EMBED> tags on a page to play 2 MP3 files. One will play through but when I press a button, I would like the main one's volume to drop to about 5% and the second one to start playing with volume at 100%. When the second one is finished I want the first one's volume to go back up to 100%. A fade in/out effect would be nice but probably too difficult. I thought of JavaScript but according to DreamWeaver, the EMBED tag doesn't have id in the list of attributes.

    Anyone have any ideas on how to do this? It's kind of urgent so any ideas at all would be greatly appreciated

    Thanks a million!

  2. #2
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    got it.......

    been puzzling over this one for an hour.

    I tried to do a simmilar thing about six months ago, but gave up

    what you want to do is embed each sound 10 times, in volume steps of ten (do this in a loop)

    have all 20 sounds starting at once

    when you want the volume to decrease, turn off the loudest sound. This should work the other way as well (turn on next loudest sound)

    The trouble with this will be the sycronization, which could be overcome by cutting the songs into samples, and play them to a time loop. This will need a good computer to work. You may even be able to use this method to stream your sounds (play first 30 second sample while preloading the next)

    Further thought on above....
    If you cut soungs into samples, you might not need to embed the same sound more than once. (start next sample at new sample volume)

    I found a Flash article, if you use it.(I've been trying not to) which would work better, at google search "changing.volume javascript"

    I hope this is of some use to you.
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  3. #3
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Thanks for the pointer, I've been searching without much luck but I must continue

    And about the 'good computer' thing, this will be used on a laptop at my school which struggles to run Win2k so I'm not even going to bother

  4. #4
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Have Internet explorer? try this.....

    Try my drumrhythm tutorial pages
    http://www.untingrhythms.com/drums/drumrhythms

    If that works on your computer you should be OK
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  5. #5
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if


Bookmarks

Posting Permissions

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