Results 1 to 9 of 9

Thread: Music Help

  1. #1
    Join Date
    Sep 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Music Help

    How do I add a second music to my Xanga other than the background sound, which I already have? I was wondering if it was possible to delay my second MP3 file.

    PS: I have a second question: Is it possible to add more music by delaying their starting time?

    Thanks!!

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here's one I made earlier (tested in IExplorer)

    Code:
    <object id="NSPlay" width="150" height="50"
    classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
    codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
    standby="Loading..."
    type="application/x-oleobject" align="middle">
      <param name="AudioStream" value="-1">
      <param name="AutoSize" value="0">
      <param name="AutoStart" value="0">
      <param name="AnimationAtStart" value="-1">
      <param name="AllowScan" value="-1">
      <param name="AllowChangeDisplaySize" value="-1">
      <param name="AutoRewind" value="0">
      <param name="Balance" value="0">
      <param name="BufferingTime" value="5">
      <param name="ClickToPlay" value="-1">
      <param name="CursorType" value="0">
      <param name="CurrentPosition" value="-1">
      <param name="CurrentMarker" value="0">
      <param name="DisplayBackColor" value="0">
      <param name="DisplayForeColor" value="16777215">
      <param name="DisplayMode" value="0">
      <param name="DisplaySize" value="4">
      <param name="Enabled" value="-1">
      <param name="EnableContextMenu" value="-1">
      <param name="EnablePositionControls" value="-1">
      <param name="EnableFullScreenControls" value="0">
      <param name="EnableTracker" value="-1">
      <param name="Filename" value="YOURFILEHERE">
      <param name="InvokeURLs" value="-1">
      <param name="Language" value="-1">
      <param name="Mute" value="0">
      <param name="PlayCount" value="1">
      <param name="PreviewMode" value="0">
      <param name="Rate" value="1">
      <param name="SelectionStart" value="-1">
      <param name="SelectionEnd" value="-1">
      <param name="SendOpenStateChangeEvents" value="-1">
      <param name="SendWarningEvents" value="-1">
      <param name="SendErrorEvents" value="-1">
      <param name="SendKeyboardEvents" value="0">
      <param name="SendMouseClickEvents" value="0">
      <param name="SendMouseMoveEvents" value="0">
      <param name="SendPlayStateChangeEvents" value="-1">
      <param name="ShowCaptioning" value="0">
      <param name="ShowControls" value="-1">
      <param name="ShowAudioControls" value="-1">
      <param name="ShowDisplay" value="0">
      <param name="ShowGotoBar" value="0">
      <param name="ShowPositionControls" value="0">
      <param name="ShowStatusBar" value="-1">
      <param name="ShowTracker" value="0">
      <param name="TransparentAtStart" value="0">
      <param name="VideoBorderWidth" value="0">
      <param name="VideoBorderColor" value="0">
      <param name="VideoBorder3D" value="0">
      <param name="Volume" value="-890">
      <param name="WindowlessVideo" value="0">
    
      <embed type="application/x-mplayer2"
    pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
    filename="YOURFILEHERE" showdisplay="0" showstatusbar="1" width="150" height="50"
    align="middle">
      </embed></object>
    Just change all instances of YOURFILEHERE with the filename of your music, for example "music.mp3".

    Hope this helps
    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Sep 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi again! Wow thanks for the super fast reply!

    I would like to ask two questions though since I'm not really sure how to use the code you gave me (I tried it and it worked flawlessly, but I then wanted to try changing the values; it didn't work, lol). Can I only use one filename in the 'YOURFILEHERE' instances or can I use two? Also, can I change anything in the 'values' area to delay the autostart so it'll start after 4 minutes and 40 seconds?

    Thanks!

  4. #4
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here's a code I've made, it starts playing the wave file after 1 second (1000ms):

    Code:
    <script>
    setTimeout("doit()",1000);
    
    function doit()
    {
       document.write('<embed src="Wave File Name Here" height=55 width=146 autostart=true hidden=true>');
    }
    </script>
    Simply change the amount of milliseconds to your desired length, and the filename to your target.

    Hope this helps
    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  5. #5
    Join Date
    Sep 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wow thanks again for the super fast reply!! This one really helped!

  6. #6
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No problem. The script simply writes a line to the website after a set amount of milliseconds, causing the browser to trigger the music.

    By the way, 4mins 40secs in msecs is 280000.

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  7. #7
    Join Date
    Aug 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by cr3ative
    Here's a code I've made, it starts playing the wave file after 1 second (1000ms):

    Code:
    <script>
    setTimeout("doit()",1000);
    
    function doit()
    {
       document.write('<embed src="Wave File Name Here" height=55 width=146 autostart=true hidden=true>');
    }
    </script>
    Simply change the amount of milliseconds to your desired length, and the filename to your target.

    Hope this helps
    cr3ative
    I tried the above script and it worked. However, when the music started after the specified time (10 secs) it played the music but on a new page. Is there a way to keep the existing page and have the music play? Thanks.

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    This is a hideously ugly method. The page will be destroyed as you tried to write to it after it has been finalized. Better to do:
    HTML Code:
    <body>
    <!-- ... -->
    <embed src="file.wav" height="0" width="0" autostart="false" hidden="true" id="sound"/>
    <script type="text/javascript">
    setTimeout('document.getElementById("sound").play();', 1000);
    </script>
    <!-- ... -->
    </body>
    Personally, I try to avoid sound in web pages, so this isn't my area of expertise. If you want the sound to loop, add loop="true" to the embed tag.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Aug 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Twey, thanks. It works great for my purposes. I agree with you on the music but this is not my call. Once thanks.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •