background sound

free web hosting
Free Web Hosting > Computers & Tech > Designing > Web Design and HTML

background sound

suicide
As part of my college work I have produced a web page, that as to include dertain elements: meta tag info, internal + external link, images, text One audio clip, and one video clip, use of frames and a no frames option, one input form, and to demonstrates the use of a template.
The problem is, I thought I had everything covered, and recieved some negative feedback, which I don't mind, but the problem is I know the music is annoying (no one more than me does) but until my tutor grades my work there it stays. So how can I make it so that it turns off (like a button or something) here is the code
<bgsound src="blackhole.mid" loop="3">
Here is the website
www.carbootersheaven.co.uk
Please take a look, this is my first attempt and I really don't want to submit my work if it aint right
Thanks

Reply

overture
ok this is my code for you. i will explain as good as i can

This code is to embed the sound onto the page. the loop value makes the sound loop until it is stopped. the autostart value is there so it starts when the page loads and the hidden value is there to keep the sound from showing up on the webpage visually. the MASTERSOUND is there to say that this is the top level sound, if you hade many sounds on the webpage.:
CODE
<embed name="BlackHole" src="blackhole.mid"
loop="true" hidden="true" autostart="true" mastersound>


To stop the background music you can call the:
CODE
document.BlackHole.stop()

method. This method is cross-browser compatible... i think. The "document" refers to the webpage the music is on. the "BlackHole" refers to the embedded sound, which it locates through the NAME tag in the embed tag. and the "STOP()" part stops the sound.

To call this from a text link use this code:
CODE
<a href="#" onClick="document.bgSound.stop(); return false;"
>Stop Music</a>


For a button use this:
CODE
<input type="button" value="Stop Music" onclick="document.bgSound.stop(); return false;">


If you need anymore help or if something doesnt work just post.

 

 

 


Reply

killer
hey thanks but wont it be easy for newebies like me to just use FLash it can put ur music to site with not diffficulty.But thanks for the code will give it a try

Reply

overture
You could use flash but if you require something like suicide needs then this is a good and simple way to do it, the only way i know of. I don't think it is that hard to figure out what the code does, even for a "newbie".

Reply

FirefoxRocks
Background sound is one of the most trickiest things of web development. This is because
1. A cross-browser, valid XHTML method is hard to implement.
2. It is considered to be annoying as users may not like it.

However, with valid (X)HTML, you can use <object> I suppose, but it doesn't work as well in Internet Explorer. You can workaround that with a conditional comment. Here is the code:
HTML
<object data="soundfile.mid" codetype="audio/mid"></object>
<!--[if IE]><bgsound loop="3" src="basdanse.mid" /><![endif]-->

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. index of background sound - 150.55 hr back. (1)
  2. cpanel and bgsound tag - 157.25 hr back. (1)
  3. bgsound src= in cpanel - 159.37 hr back. (1)
Similar Topics

Keywords : background

  1. Locking Background Image To Browser Borders. - (7)
  2. What Is The Best Size To Make A Background In Photoshop? - (6)
    I'm using Photoshop 7 and I want to make my own background. I'm learning how to do some
    neat things with it now. My question is, once I open up a new file, what size do I make it so that
    every person who visits my site will be able to view it correctly? I know people don't all have
    the same screen resolution, so what do I do? I want to make a banner too and am having the same
    dilema. Do I just make it one size, like 800x600 then have to do some kind of code to make sure it
    looks good for everyone? If so, can someone please tell me how it goes?...
  3. How Do I Keep A Background On My Site - (14)
    I had a background on my site that i got on the internet. I don't remember the name of the site
    but from it I was able to save the background (which was a textured blue background) to
    photobucket.com. I've had it there for awhile, but now, all-of-the-sudden it disappeared. I
    guess you can only keep things on photobucket for so long. But how do I keep a background on my
    site if I can't host it somewhere? Is there a way to put the picture in cPanel and use it from
    there? If there is, I cant figure it out....
  4. Need Help With JPEG Background - (4)
    I'm just starting to design my website. So far, it looks okay. Here's a basic rundown:
    index.html is divided into two frames: menubar.htm (25%) and "mainwindow" (75%). The menu bar has
    about 7 images which, when clicked, open other .htm files in "mainwindow". I want a background image
    "tsmg2.jpg" (which is in the same folder as everything else) to be behind the 7 link- images. The
    image works, I know- I can code and it will display it. However, I want it as the background .
    I've been coding and putting that right under the first opening tag. Why...
  5. Html Background Tutorial - (2)
    Back grounds are very essential in html and if you dont know how you can make a background on your
    website then there is no use of creating one . First well start with the basics . Color Background
    : If you want to change your backgrounds color you put this code in the body of the page : CODE
    Where the ###### are you have to put a color code . Just put that in and save your page and
    thats done . Image Backgrounds : The code below takes an image and puts it on the background on
    the page : CODE Thats all but if you have any questions at all ab...
  6. Change Background Color Of Web-page With This - (0)
    change background script input this in your html in the CODE ...
  7. putting a background color makes a slight problem - (7)
    take a look at this code Test 1 Test2 Test3
    when the tag for the background color of the page is put in, it makes the top cell for the table
    appear slightly off. however when it's not in, the cell inside the table appears fine...



Looking for background, sound






*SIMILAR VIDEOS*
Searching Video's for background, sound
advertisement




background sound



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE