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 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2010
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    playing sound on mouseclick?

    How can I play a sound when I click an image, without the information bar popping up at top? I've looked all over, and I've tried a few javascript-only methods but none have worked for me.. Is flash the only way to go?

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    You could put a hidden windows media player into the page and trigger it with javascript. That should play your sounds without any popup bar, but it would require users to have the necessary plugin for their browser in order to use it. It comes preloaded on Internet Explorer, but Firefox and other users will not have it unless they choose to download and install it.

    The same goes for Silverlight, which is also a Microsoft product that users have to download and install a plugin in order to use. The up side for Silverlight is that it's probably more likely to exist on user's machines than the WMP plugin would be.

    Anyway, flash is most likely to be supported by your users' browser but you do have other options.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    LinkBacks (?)


    Posting Permissions

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