Topic: Help with music player
the_wizard67's photo
Thu 03/05/09 07:37 AM
I have a music player that I am trying to use on a website and I want it to have an infinite loop, but I can't seem to get it to play more than once. Here is the code that I am working with.

<SCRIPT src="http://www.tiptopwebsite.com/music/swfobject.js" type="text/javascript"></SCRIPT><SCRIPT type="text/javascript">var s1 = new SWFObject("http://www.tiptopwebsite.com/music/player.swf","player","200","20","9"); s1.addParam("allowfullscreen","true"); s1.addParam("allowscriptaccess","always"); s1.addParam("flashvars","file=http://www.tiptopwebsite.com/custommusic2/bmhoward.mp3&autostart=true", loop="infinite"); s1.write("preview");

I loop section does seem to be being read, but it doesn't help. I am sure it is just a syntax issue or location, but I am stuck.

no photo
Thu 03/05/09 07:39 AM
Sorry man cant hel you..I use itunes

jgfran01's photo
Sat 03/14/09 12:02 AM
Edited by jgfran01 on Sat 03/14/09 12:18 AM

I have a music player that I am trying to use on a website and I want it to have an infinite loop, but I can't seem to get it to play more than once. Here is the code that I am working with.

<SCRIPT src="http://www.tiptopwebsite.com/music/swfobject.js" type="text/javascript"></SCRIPT><SCRIPT type="text/javascript">var s1 = new SWFObject("http://www.tiptopwebsite.com/music/player.swf","player","200","20","9"); s1.addParam("allowfullscreen","true"); s1.addParam("allowscriptaccess","always"); s1.addParam("flashvars","file=http://www.tiptopwebsite.com/custommusic2/bmhoward.mp3&autostart=true", loop="infinite"); s1.write("preview");

I loop section does seem to be being read, but it doesn't help. I am sure it is just a syntax issue or location, but I am stuck.


The problem with embedding background music is that the different browsers out there have their own methods of implementing embedded music files.

For all versions of Netscape, as well as IE 3.0 and above, you can use the following code:

<embed src="yourmusicfile.mid" autostart="true" loop="true"
width="2" height="0">
</embed>
The width and height attribute given above causes the player to be invisible. If you do not want it to be invisible, you can specify your own dimensions to suit your site decor.

For Opera and all IE versions, the following code works:

<bgsound src="yourmusicfile.mid" loop="infinite">
As you probably have noticed, IE 3.0 and above support both methods, so you cannot simply put both those tags into your web document in the hope of supporting all browsers. It will work on Netscape and early versions of IE, but the newer versions of IE will recognize both tags, leading to problems when IE tries to load the music file twice.

The workaround that I've seen on some sites, that seems to work for me, is to enclose the BGSOUND tag inside NOEMBED tags, thus preventing IE from interpreting the second tag.

<embed src="yourmusicfile.mid" autostart="true" loop="true"
width="2" height="0">
</embed>
<noembed>
<bgsound src="yourmusicfile.mid" loop="infinite">
</noembed>


uaslady's photo
Sun 03/15/09 11:01 AM
hi . i put kazaa on my computer it want let me serch for songs are download music . i don't know what to do ..

no photo
Sat 03/28/09 12:45 PM
Use Ares or Limewire instead.