Google Answers Logo
View Question
 
Q: web design ( Answered 5 out of 5 stars,   1 Comment )
Question  
Subject: web design
Category: Computers > Internet
Asked by: jossychina-ga
List Price: $25.00
Posted: 05 Mar 2004 15:16 PST
Expires: 04 Apr 2004 16:16 PDT
Question ID: 313893
I am building a site and I really have to add sound to it but there is
a problem: I am using a subdomain. So how do I add sound to a
subdomained site?
I'll like a good and understandable answer.

Request for Question Clarification by darrel-ga on 05 Mar 2004 15:21 PST
What software are you using? What is the primary domain?

Clarification of Question by jossychina-ga on 05 Mar 2004 17:13 PST
am using www.esmartstart.com and my url: http://www.osamah.50g.com
Answer  
Subject: Re: web design
Answered By: larre-ga on 05 Mar 2004 18:38 PST
Rated:5 out of 5 stars
 
Hi Jossychina, 

Having become very familiar with the subdomains mentioned in an
earlier question, sound files are allowed, but they cannot be played
all by themselves as a "hot link". They can be accessed only by HTML
pages that reside in your own subdomain.

Here is code that will enable you to play various sound files. 

I have named an imaginary sound file sound.whatever and created
cut-and-paste HTML code for you to use. You will need to rename the
imaginary file, using your own, actual file name(s).

Examples: 

     Replace sound.whatever with your_song_filename.mid   -- or
     Replace sound.whatever with your_song_filename.wav   -- or
     Replace sound.whatever with your_song_filename.mp3   -- or
     Replace sound.whatever with your_sound_filename.wav

After you've completed the page, both the HTML page and your sound
file(s) will need to be uploaded to your site.

Unless you are familiar with subdirectories and paths, place both the
HTML page(s) and the sound file(s) in the same directory/folder.


BASIC HTML CODE FOR SOUNDS
**************************

This code will:

-- Start playback automatically as soon as the visitor "enters" the
   page

-- Play the sound file over and over until turned off or until
   visitor goes to another page. 

-- Show the standard console (player) at a size of 144 by 60 pixels.


<!---------- Begin BASIC SOUND Code --------------------------------->

<embed src="sound.whatever" width="144" height="60">
</embed>

<!---------- End BASIC SOUND Code ----------------------------------->



HTML CODE FOR A SMALLER CONSOLE
*******************************

This code will:

-- Start playback automatically as soon as the visitor "enters" the
   page

-- Play the sound file over and over until turned off or until
   visitor goes to another page. 

-- Show the small console (player) at a size of 144 by 15 pixels.


<!---------- Begin SOUND Code - SMALL CONSOLE ---------------------->

<embed src="sound.whatever" width=144 height=15 controls=smallconsole>
</embed>

<!---------- End SOUND Code - SMALL CONSOLE ------------------------>



HTML CODE - NO CONSOLE (INVISIBLE)
**********************************

-- Start playback automatically as soon as the visitor "enters" the
   page

-- Play the sound file over and over until turned off or until
   visitor goes to another page. 

-- No console or controls will be shown.


<!---------- Begin SOUND Code - INVISIBLE CONSOLE ------------------>

<embed src="sound.whatever" height=23 width=35 controls=none
</embed>

<!---------- End SOUND Code - INVISIBLE CONSOLE -------------------->



MORE OPTIONS 
************

You may add the following attributes to the embed statement(s) singly or together.

autostart=true,false

loop=true,false,integer

volume=5 (integer between 1 and 10, default is 10)


HTML CODE FOR SOUNDS - VOLUME - AUTOPLAY - LOOPING
**************************************************

This code will:

-- Show the standard console (player) at a size of 144 by 60 pixels.

-- Start playback only when the visitor clicks on the PLAY button on
   the console.

-- Play the sound file two times only, then stop.

-- Play the sound file at a volume of 5


<!---------- Begin SOUND Code --------------------------------->

<embed src="sound.whatever" width="144" height="60" loop=2
autostart=false volume=5>
</embed>

<!---------- End SOUND Code ----------------------------------->


While the code samples above offer the easiest way of adding sound to
your pages, this method is becoming outmoded. More modern code would
embed a media object into the web page. You can also set parameters
for console size, autostart, loop, and volume.


<!---------- Begin OBJECT EMBED Code -------------------------->

<object
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="FileName" value="sound.whatever" />
</object> 

<!---------- End OBJECT EMBED Code ---------------------------->



Sound Tutorials
*********************

Playing Sounds in a Browser
http://www.w3schools.com/media/media_browsersounds.asp?output=print

Embedded Objects - HTML Controls
http://www.faqs.org/docs/htmltut/embeddedobjects/_EMBED_CONTROLS.html

Audio for the Web Tutorials (highly recommended)
http://www.fluffbucket.com/othettutorials/audio/index.htm


Google Search Terms
----------------------------------------------------------------------

embed sounds tutorials
embed audio HTML
embed audio object

If I've missed anything (specific player, or filetype you wish to
use), or something seems unclear, please ask for clarification. I'll
be glad to add to my answer, try simplify, or explain in further
detail.

---larre

Request for Answer Clarification by jossychina-ga on 06 Mar 2004 06:46 PST
Now that I can't upload a music file that has a large size, can I link
my music to another site url and it works fine? If it is possible,
then send the codes.
I really love those codes u sent. It was clear and understandable.

Clarification of Answer by larre-ga on 06 Mar 2004 09:58 PST
Hi,

I'm glad you liked the code samples. You can use them as I've written,
and import a music file, just by making one substitution.

To link to an offsite music file, all you need to do is substitute the
URL of that file you wish to play, instead of using only the file name
(sound.whatever in my code examples above).



<!---------- Begin BASIC SOUND Code --------------------------------->

<embed src="http://site.com/mysite/song.wav" width="144" height="60">
</embed>

<!---------- End BASIC SOUND Code ----------------------------------->


Change http://site.com/mysite/song.wav to match the URL (location) of
your sound file.

Be sure to check on the policies of the second web host to be sure
that they allow files stored on their servers to be hotlinked.
(Hotlink = export as a single file, rather than as part of a web page
stored on their own servers).

Good luck. Please feel free to ask for further clarification if
anything is unclear.

---l

Request for Answer Clarification by jossychina-ga on 16 Mar 2004 13:15 PST
Send an inviscible sound code like the one you just sent that will
continue to play without stop. I mean the one that will continue to
loop.

Clarification of Answer by larre-ga on 16 Mar 2004 13:53 PST
This code will start automatically, and loop indefinitely:

<!---------- Begin LOOPING SOUND Code ------------------------------->

<embed src="http://site.com/mysite/song.wav" width="144" height="60"
autostart="TRUE" loop="TRUE">
</embed>

<!---------- End LOOPING SOUND Code --------------------------------->


I hope this helps!  ---l

Clarification of Answer by larre-ga on 16 Mar 2004 13:55 PST
This code hides the console:


<!---------- Begin HIDDEN LOOPED SOUND Code ------------------------->

<embed src="http://site.com/mysite/song.wav" width="144" height="60"
autostart="TRUE" loop="TRUE">
</embed>

<!---------- End HIDDEN LOOPED SOUND Code --------------------------->

---l

Clarification of Answer by larre-ga on 16 Mar 2004 13:56 PST
I'm sorry... I'm having posting difficulties today. This code should be correct:

<!---------- Begin HIDDEN LOOPED SOUND Code ------------------------->

<embed src="http://site.com/mysite/song.wav" width="144" height="60" hidden="TRUE" 
autostart="TRUE" loop="TRUE">
</embed>

<!---------- End HIDDEN LOOPED SOUND Code --------------------------->
jossychina-ga rated this answer:5 out of 5 stars and gave an additional tip of: $2.00
I really love that job. You are really good.

Comments  
Subject: Re: web design
From: larre-ga on 07 Mar 2004 10:50 PST
 
Thank you for the 5 star rating(s) and tip. I'm glad I could help :-) 

---l

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy