Thursday, February 24, 2011

How to preload a sound file?

By Magesh Kumar   Posted at  4:02 AM   HTML No comments


You can preload music files so that the music starts immediately after the user has clicked on the link. You can preload using the following technique:
<embed name="lostmojo"
src="/web_design/lostmojo.wav"
loop="false"
autostart="false"
hidden="true"
mastersound />
This embeds the sound, but the 'autostart' feature is off (you don't want to annoy the user now, do you?) and the 'hidden' feature is true, so the user doesn't see a console upon entering your webpage.

You can also link to a music file using the <a href= tag. All you need to do is write something like this:
Listen to a sample of <a href="/web_design/lostmojo.wav">Lost Mojo</a>
This obviously assumes that the music file is in the specified location.

About the Author

Nulla sagittis convallis arcu. Sed sed nunc. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo.
View all posts by: BT9

0 comments:

Back to top ↑
Connect with Us

What they says

© 2013 MaGeSH 2 help. WP Mythemeshop Converted by BloggerTheme9
Blogger templates. Proudly Powered by Blogger.