Add Sound to Page Help please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Nite Producer
    Lieutenant Colonel

    • May 2006
    • 593

    Add Sound to Page Help please

    Hi everyone,

    I need help on adding sound in page properties:

    when doing the above, I want to create in my page an icon music on off, can anybody tell me how can I do it and give me if there is any script to put for that?

    Thanks guys

    www.niteproduction.com
    The Producer
  • VodaHost
    General & Forum Administrator

    • Mar 2005
    • 12356

    #2
    Re: Add Sound to Page Help please

    tis requires a bit of coding, Here is a simple work-around. You have two indenticle pages.

    /index.html
    /index2.html

    When they click to turn off the music, they go to index2.html the page that does not have any music.

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    02036089024 / United Kingdom
    291916438 / Australia

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


    Comment

    • Nite Producer
      Lieutenant Colonel

      • May 2006
      • 593

      #3
      Re: Add Sound to Page Help please

      Hi again,

      Well, That's true, but I would like to have that coding if someone could give me that, having two different pages as you said is good, but I don't want to present myself as an under begginer

      Please if anyone can help me on this
      The Producer

      Comment

      • Andy128
        Major General

        • Dec 2005
        • 2317

        #4
        Re: Add Sound to Page Help please

        I think I have just what you are looking for;



        Hope that helps,

        Andy
        PHP- is a blast!

        Comment

        • Nite Producer
          Lieutenant Colonel

          • May 2006
          • 593

          #5
          Re: Add Sound to Page Help please

          Andy, Thanks, that was so helpfull, I like it.

          But can I ask you a favor?

          what I wanted actualy is to put in the corner on l off

          in this way you just click on it's playing and off for the opposite, do you know how?
          The Producer

          Comment

          • Andy128
            Major General

            • Dec 2005
            • 2317

            #6
            Re: Add Sound to Page Help please

            Is this what you mean?

            Configure and maintain your computer and use it more effectively to design and program a web site and make money on the web.


            You could modify the table/color and stuff to suit your needs.

            Andy
            PHP- is a blast!

            Comment

            • Nite Producer
              Lieutenant Colonel

              • May 2006
              • 593

              #7
              Re: Add Sound to Page Help please

              Hi andy,

              The second one is ok, but the design of the speakers and the on off boxes are not really going with my pages design, actually I just want to put it as text, but anyway, I guess I will go with your first option.

              Andy, thank you very much, your name is in the golden list of mine. One day you will benifit from my website god things because you helped me few times.
              The Producer

              Comment

              • Nite Producer
                Lieutenant Colonel

                • May 2006
                • 593

                #8
                Re: Add Sound to Page Help please

                Hang on Andy, allright, got it now, but could you send me a script for the following:

                I would like to have the first box "the green one" without borders and with black background, but I don't know if it would be possible to have it horizontal not vertical.

                Thanks
                The Producer

                Comment

                • ez-ez
                  Special Status

                  • Mar 2006
                  • 1329

                  #9
                  Re: Add Sound to Page Help please

                  Hi.. I understand that you want your page to load a music clip in the background and give the visitor the option to turn it off without having to leave the page. If my understanding is correct, and if I was to do this I would do it this way:

                  Embed Media Player and code it to Autostart.
                  Create buttons (note that you can use any mage for this, whether it is buttons that you designed, or text or any type of image) and code these buttons (images) so that one will start the player and the other stops the player.
                  This will mean that the page loads with the music clip, visitor can trun it off, but also can restart it.

                  Please let me know if you want the whole code.

                  Comment

                  • Nite Producer
                    Lieutenant Colonel

                    • May 2006
                    • 593

                    #10
                    Re: Add Sound to Page Help please

                    Hi ez ez,

                    Honnestly I have no idea about coding and scripts, but your idea sounds great, would you show me step by step how to do what you said, I'll be so thankful, niteproduction.com will know how to return favors.

                    Thank you in advance.
                    The Producer

                    Comment

                    • ez-ez
                      Special Status

                      • Mar 2006
                      • 1329

                      #11
                      Re: Add Sound to Page Help please

                      Originally posted by Nite Producer
                      Hi ez ez,

                      Honnestly I have no idea about coding and scripts, but your idea sounds great, would you show me step by step how to do what you said, I'll be so thankful, niteproduction.com will know how to return favors.

                      Thank you in advance.
                      Hi The Producer..
                      Sorry I couldnt get back to you earlier.
                      Setting up an 'embeded hidden media player with artificial controls is an easy process.. Even though you are not an experienced script writer, I am sure you will be able to break the script down and implement it correctly. In case of emergency, here is the Link to Microsoft relevant tutorial which I'm sure you will find useful:

                      Experience the latest Microsoft Windows 11 features. Learn how our latest Windows OS gives you more ways to work, play, and create.


                      Ok.. So now lets get your media (Background Music with Controls) into your pages.

                      Firstly, it is a good idea to put the entire script into a HTML box. While in most cases the script is put in the 'Head' Tag of the Page, in this case we will put the entire script in a HTML Box which will be in the 'Body' of the page. The benefit of this is that if the page is accessed by someone that uses a non compatible script machine, the player function will not start, but it will not affect the function of the rest of the page either. Note that this is a Microsoft Written script which serves ***** as well.. this would give you access to 99.8% of PC's around the world.

                      In the script below, you will find some color coded text, the Red text indicates the things you 'Must' Change. The Green Text indicates the thing you 'Can' Change.The black text is to remain unchanged as it may affect functionality of the cript.

                      Also, this would be a good opportunity for you to understand some basics about scripting.. From the script below, you will find 3 elements:

                      1. The Embeded player: This is the actual media player that will be streaming and running your music files.
                      2. The control buttons: Note that you can use text or images to replace those to your favored styles.. If you decide to do that, you need to insert the 'onclick' string in their HTML... Example: you might use a small GIF picture of a disc as a play button.. In that case, you would insert your GIF Image, open its HTML and insert the Onclick string which you will see in the script below.
                      3. The script that is triggered by your controls.. This is a simple script that tells the player to play or stop.. (The fact that the player opens with the page and starts automatically is not part of the script, its just a customization option as Media Player contains that feature.. ie, autostart and the location of the file to start).

                      The Script:
                      Insert this script in a HTML Box.

                      <OBJECT ID="Player" height="0" width="0"
                      CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
                      <PARAM name="autoStart" value="true"/>
                      <PARAM name="URL" Value="http://mywebsite/mymusic/musicfile.wma"/>
                      <PARAM name="Loop" value="TRUE"/>');
                      </OBJECT>
                      <INPUT TYPE="BUTTON" NAME="BtnPlay" VALUE="Play" OnClick="StartMeUp()">
                      <INPUT TYPE="BUTTON" NAME="BtnStop" VALUE="Stop" OnClick="ShutMeDown()">

                      <SCRIPT>
                      <!--
                      function StartMeUp ()
                      {
                      Player.URL = "http://mywebsite/mymusic/musicfile.wma";
                      }
                      function ShutMeDown ()
                      {
                      Player.controls.stop();
                      }
                      -->
                      </SCRIPT>

                      From the script above, you will notice that clicking the button will trigger the script to do what is supposed to do, ie, start or stop.. Note that these buttons can be used infinately, this means that the player can be started and stopped as many times as you want during the same session.

                      You will also notice that I've included a 'Loop' PARAM. This means that if you use a short clip, which you are advised to do, it will loop and repeat itself until the 'Stop' button is clicked or the visitor leaves the page.. If you prefer that your clip plays only once.. you can remove that entire 'PARAM' string.

                      Testing Process:

                      While many people will advise that music must be streamed from a server for testing... It's not true.. you can insert the location of your file on your machine... test the process in preview mode... and once you are satisfied with the result, chage the file 'src' to the server location where it will be streamed from. And finally, ofcourse, upload the music file itself onto the server.

                      Hope this helps.

                      Comment

                      • Nite Producer
                        Lieutenant Colonel

                        • May 2006
                        • 593

                        #12
                        Re: Add Sound to Page Help please

                        ouuuuuuuukkkkkkkkkk, so complicated but I will take time later to test it and try it.

                        Anyhow, it's really great, you are nice guy to take time to show me that, but really I don't know how to thank you now but keep in touch, my website will be ready and out in jan 2007, you will benefit interesting things from it for free, I always remember good friends and how to return favors.

                        Thank you so much.

                        Nite Producer
                        The Producer

                        Comment

                        • Nite Producer
                          Lieutenant Colonel

                          • May 2006
                          • 593

                          #13
                          Re: Add Sound to Page Help please

                          So question before I start,

                          1- I have to put my media music in the page first right or wrong?
                          2- I put the entire script into an html box in the top of the page?
                          3- I create a text 'on' and give it a script <INPUT TYPE="BUTTON" NAME="BtnPlay" VALUE="Play" OnClick="StartMeUp()">
                          4- I create a text 'off' and give it the script <INPUT TYPE="BUTTON" NAME="BtnStop" VALUE="Stop" OnClick="ShutMeDown()">

                          and that's it will go to party in niteproduction?

                          First of all thank you for that detailed explaination, I will thank you forever hehehehehe on every post I guess now.
                          The Producer

                          Comment

                          • Nite Producer
                            Lieutenant Colonel

                            • May 2006
                            • 593

                            #14
                            Re: Add Sound to Page Help please

                            Sorry ez ez,

                            I just didn't get this:
                            chage the file 'src' to the server location where it will be streamed from
                            The Producer

                            Comment

                            • Nite Producer
                              Lieutenant Colonel

                              • May 2006
                              • 593

                              #15
                              Re: Add Sound to Page Help please

                              ok ez ez,

                              I know what you mean now but still my final question are as following

                              1- I have to put my media music in the page first right or wrong?
                              2- I create a text 'on' and give it a script <INPUT TYPE="BUTTON" NAME="BtnPlay" VALUE="Play" OnClick="StartMeUp()">
                              3- I create a text 'off' and give it the script <INPUT TYPE="BUTTON" NAME="BtnStop" VALUE="Stop" OnClick="ShutMeDown()">
                              4- I didn't get this: chage the file 'src' to the server location where it will be streamed from

                              Thanks mate
                              The Producer

                              Comment

                              Working...
                              X