Hey guys, it's been a long time since I posted...great to be back.
{technically i wasnt away....... Laughing }

I have a prob with a particular script that I need for my site, it's a media player, but the shuffle option keeps messing up I think, and the play button wont work Neutral


Here's the script: I'll be glad if anyone can help me

Quote:
<object id="darkplayer" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
type="application/x-oleobject" height="0" standby="Loading Microsoft Windows Media Player components..." width="0"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95">
<param NAME VALUE>
<param NAME="ShowControls" VALUE="0">
<param NAME="ShowStatusBar" VALUE="0">
<param NAME="ShowDisplay" VALUE="0">
<param NAME="DefaultFrame" VALUE="Slide">
<param NAME="Autostart" VALUE="1">
<param NAME="Loop" VALUE="True">
</object>
<form name="blueplayer">
<center>
<select style="FONT-SIZE: 8pt; BACKGROUND:#d2d2d2; WIDTH: 115; COLOR: #0000ff; font-face: arial; height:25;"
name="playlist" size="1">
<option value="0">SONG TITLE 1</option>
<option value="1">Jay-Z+Linkin Park: Numb/Encore</option>
<option value="2">Jay-Z+Linkin Park: H to the Izzo</option>
<option value="3">Jay-Z+Linkin Park: Points of Authority/99 Problems/One Step Closer</option>
<option value="4">The Killers: Mr. Brightside</option>
<option value="5">50 Cent: In Da Club</option>
<option value="6">Linkin Park: Runaway</option>
<option value="7">Kryptonite</option>
<option value="8">Green Day: American Idiot</option>
<option value="9">Green Day: Boulevard of Broken Dreams</option>
</select>
<input TYPE="BUTTON" NAME="darkplay" VALUE="play" OnClick="play(document.forms['blueplayer'].playlist);">
<input TYPE="BUTTON" NAME="darkpause" VALUE="pause" OnClick="document.darkplayer.pause(); playstate=2;">
<input TYPE="BUTTON" NAME="darkstop" VALUE="stop" OnClick="document.darkplayer.stop(); playstate=2;"></p>
</form>

<script language="JavaScript">
<!--
var playstate = 1;
shuffle = 1;
songs=new Array();
songs[0]="http://gfxpros.diversefusion.com/mp3/31.mp3";
songs[1]="http://www.angiemcbrideracing.com/Jay-Z_and_Linkin_Park-encore_numb.mp3";
songs[2]="http://www.students.sonoma.edu/users/l/lambkin/yatchclub/songs/JayZHToTheIzzo.mp3";
songs[3]="http://homepages.nildram.co.uk/~cantril1/06-jay-z_and_linkin_park-points_of_authority-99_problems-one_step
_closer-kzt.mp3";
songs[4]="http://www.thecrutch.net/mp3/thekillers-mrbrightside.mp3";
songs[5]="http://www.cvm.qc.ca/gestion/2002-2003/sitesPersonnels/Ducharme/Musique/50%20cent-In%20Da%20Club
%20(clean).mp3";
songs[6]="http://edu.kajaani.fi/~tvekki1/linkin%20park%20-%20runaway.mp3";
songs[7]="http://sport.sanet.fi/clips/Kryptonite.mp3";
songs[8]="http://data.over-blog.com/lib/5/9/10395/files/01---Green-Day---American-Idiot.mp3";
songs[9]="http://users.telenet.be/augurk/boulevard.mp3";

if (shuffle == 1) {
var randsg = Math.floor(Math.random()*songs.length);
document.darkplayer.FileName = songs[randsg];
document.darkplayer.scr = songs[randsg];
document.forms['blueplayer'].playlist.options['randsg'].selected = true;
}
function play(list) {
if (playstate == 2) {
document.darkplayer.Play();
} else {
var snum = list.options[list.selectedIndex].value;
document.darkplayer.FileName = songs[snum];
document.darkplayer.scr = songs[snum];
}
playstate = 1;
}
//-->
</script>
Could you give a link to see that in action? Oh, and you need to reupload your avatar.
Ok, i'll do that soon

Jfernand2.tk
Look at bottom of the board and you'll see a selection box with Song Title 1 as a choice with others, but it wont work. Sad
Well, you're right that it doesn't work. Very Happy
Any ideas, guys?
no clue, but i'd think a flash media player would be easier and better....
Actually, using a plugin for Quicktime or Windows Media Player, and then embedding the media into the page would be the best and easiest way to do it...
But then would it have a shuffle ability?
This thingy I have is suposedly supposed to shuffle the songs, but it doesn't work...

However, I'd still like to know how I would be able to do what you mentioned Smile
Yeah, that would make it that you could either only play one song or only play them all in a specific order.
Kerm...this is what i've been trying to do...but i suck at Javascript...
Oh, this is the kind of thing you meant?? I was imagining something much different for what you were talking about. Smile
Ultimate Dev'r wrote:
Actually, using a plugin for Quicktime or Windows Media Player, and then embedding the media into the page would be the best and easiest way to do it...


but its also the least flexible.

An example of a flash player would be something like this: http://www.kllrnohj.com/mp3player/music/ - it uses a .xml file to store playist/song info/location, and allows for multiple playlists.

The best part, tho, is that it is extremely cross-platform compatible. Embedded media doesn't like to work right for me in linux (i have tried several distros/media players - never works right), but i can get flash to work just fine
Yeah, even Firefox in win32 doesn't render some embedded media.
how the heck did u do that???
Huh? How did I do what? I didn't do anything... Smile
I was talking 2 Kllrnohj... Laughing
Ah, yeah, that was pretty awesome...
wizard3246 wrote:
how the heck did u do that???


google....sshh Wink

actually its a block module for PHP-Nuke, i merely ripped off the php dependant stuff, and slightly recoded the flash file (yes, i know how to bypass "protected" .swf movie restrictions)

if you want it, just lemme know and i'll post a download for it (it was released under GNU GPL originally, so it would still be legal to redistribute)
plz...will u post it for download...but how do u get the XML?
the xml file is included, along with a readme (it is fairly self explanitory)

http://www.kllrnohj.com/mp3player/mp3player.tar.bz2
i am in way over my head with XML...
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 4
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement