SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Wav on demand

Hybrid View

  1. #1
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a wav file that I would like played (not downloaded) when someone click on a play button gif. Does anyone know how to go about to acheive this?

    If this cannot be done or if there is a better way please let me know.

    I tried <embed src="file.wav" autostart="false" hidden="false"> but IE5 didn't react well to it.

    Thank you

  2. #2
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this really that hard?!? You used to see this done all the time 2 or 3 years ago on personal homepages. Doesn't anyone remember how they did it?

  3. #3
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, how did I completely miss this thread?

    Anyway....

    The code to do it on both browsers (IE and Netscape have different code for embedding sounds) was (as far as my sketchy memory can be recalled - I'll fix it up when I get home and get my reference out) :

    <embed src="yourmidi.mid" (+other attributes)><noembed><bgsound src="yourmidi.mid" (+other attributes)></noembed>

    The embed src applied to Netscape, and bgsound src applied to IE.

    To embed properly in IE5 I believe you need to use the <object> tag (which is another kettle of fish in itself) - I'll post again when I can find the code. Try the embed/bgsound src for now and it should work reasonably in both browsers.

    Good luck!
    My 2 Cents (or is that 2.2 Cents including GST?)

  4. #4
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For some reason I'm not having any luck in IE5. I haven't even tried NS yet.

    IE also reacts weird to the embed code. It gives me the following error when I load the page:

    Plugin error:
    The data the plugin requested, did not download succesfully.
    (Yes, there really is a comma there!)

    And Dreamwaver 4 doesn't recognize the <noembed> tags.

    I didn't think this would have been so complicated. I already did it before, I just don't remember how since it was so long ago!


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
  •