PDA

View Full Version : Music Help



Inuyasha2087
09-03-2004, 11:56 PM
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?

:D Thanks!! :)

cr3ative
09-04-2004, 06:53 AM
Here's one I made earlier (tested in IExplorer)



<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

Inuyasha2087
09-05-2004, 01:15 AM
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!

cr3ative
09-05-2004, 08:52 AM
Here's a code I've made, it starts playing the wave file after 1 second (1000ms):




<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

Inuyasha2087
09-05-2004, 06:27 PM
Wow thanks again for the super fast reply!! This one really helped!

cr3ative
09-05-2004, 06:54 PM
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

datachem
08-03-2005, 12:43 PM
Here's a code I've made, it starts playing the wave file after 1 second (1000ms):




<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.

Twey
08-03-2005, 01:11 PM
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:

<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.

datachem
08-04-2005, 04:41 AM
Twey, thanks. It works great for my purposes. I agree with you on the music but this is not my call. Once thanks.