Solved

Preload sound

Posted on 2001-07-03
6
597 Views
Last Modified: 2008-02-01
  How do I preload a sound event that will be used for mouseover sound?
0
Comment
Question by:Bob Stone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 1

Accepted Solution

by:
sgopalan earned 100 total points
ID: 6250259
Netscape 3.0+ and MSIE 4.0+ allow using the embed tag.

<EMBED NAME="mySound" SRC="mySound.wav"
LOOP=FALSE AUTOSTART=FALSE HIDDEN=TRUE MASTERSOUND>

Once the sound is preloaded, Netscape has the option of using document.mySound.play() to play the sound.
With IE you might have to use something like
document.all['BGSOUND_ID'].src='mySound.wav'
with BGSOUND_ID additionally defined in
<BGSOUND id="BGSOUND_ID" LOOP=1 SRC="silence.wav">
where silence.wav is a silent sound file.
0
 
LVL 9

Author Comment

by:Bob Stone
ID: 6250431
   The page is framed and the sounds I want to play are on an inside page in main frame, can I preload on index or menu frame so that the play as soon as person does mouseover on that page?
0
 
LVL 1

Expert Comment

by:sgopalan
ID: 6250637
i believe u can.. just reference the page with the sound embedded in it using the regular frames heirarchy.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:sgopalan
ID: 6250686
i believe u can.. just reference the page with the sound embedded in it using the regular frames heirarchy.
0
 
LVL 1

Expert Comment

by:sgopalan
ID: 6250688
i believe u can.. just reference the page with the sound embedded in it using the regular frames heirarchy.
0
 
LVL 9

Author Comment

by:Bob Stone
ID: 6256605
Worked great!

Thank =o)
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question