Justin
05-28-2003, 02:44 PM
how do you tell javascript to start playing a midi in a function
|
Click to See Complete Forum and Search --> : music Justin 05-28-2003, 02:44 PM how do you tell javascript to start playing a midi in a function Jona 05-28-2003, 03:14 PM This may help: http://geocities.com/god_loves_07/next_mid.html Justin 05-29-2003, 02:31 PM do you make it play a midi in function music? Jona 05-29-2003, 03:37 PM By simply changing the src of the bgsound element. Jona Justin 05-30-2003, 02:18 PM would that look in a code? Jona 05-30-2003, 02:31 PM Did you look at the link above? <script type="text/javascript"> <!-- function changeMIDI(){ document.getElementsByTagName("BGSOUND")[0].src="file.mid"; } //--> </script></head> <body> <bgsound src="" loop="infinity"> </body></html> Justin 05-30-2003, 02:35 PM that helped Jona 05-30-2003, 02:35 PM Sure thing. ;) Jona Justin 06-02-2003, 02:32 PM i was looking at it last weekend, and it helps a bunch thanks again scriptkid 06-02-2003, 02:40 PM just curious but why would u make a game with html/javascript rather than flash or something of the equal Justin 06-02-2003, 02:44 PM idon't know flash Where would you learn it? or read about it Jona 06-02-2003, 02:47 PM To make Flash objects, you must use Macromedia's Flash program to generate it. Flash has its own scripting language, called "ActionScript," and it is very similar to JavaScript--almost identical. Also, the program isn't cheap, and there are lots of sites on the Web with tutorials. Try searching Google. Also, there is http://flashkit.com/ Jona Justin 06-03-2003, 03:00 PM is there any way to make a playlist with this code, (not flash i mean with the javascript code you told me) Jona 06-03-2003, 03:06 PM You mean a list of songs that plays over and over again? Yeah, that's easy. You just use setTimeout() to run each function on a certain timing. You can also set it up to have a selection box that when you click one it plays that MIDI instead, and have to where when it goes to the next song, the next option in the select box is selected automatically. Jona Justin 06-03-2003, 03:09 PM ya i was thinking of a timeout, i was hopeing that it would have something where you could input a bunch of sogs and have it go the the next one automaticly Jona 06-03-2003, 03:15 PM If you hold your breath for 1.281021982384 million seconds, I'll see what I can do. :D Seriously, though, I'll take a whack at it and give you what I come up with in a few minutes... That is, if I don't keep getting more questions to answer continuously! :p Jona brendandonhue 06-03-2003, 06:44 PM I couldn't find a way to get it to go to the next song automatically, because it doesn't "know" when the current song is over. Yes, its IE only, but here is something neat I made a couple weeks ago that might help. I did not upload the MP3s, so you won't hear the music...but notice what happens if you are on the last track and hit Next, or if you are on the 1st track and hit back. http://mywebpages.comcast.net/brendandonhue/mp.html Jona 06-03-2003, 11:36 PM I finally got around to it. Whew! Busy day! Here (http://www.geocities.com/god_loves_07/playlist.html) it is. It works in IE only (the music) right now. I'll work on it some more to get it finished working better in other browsers... P.S. Please keep the comment tags in there. ;) Jona Justin 06-27-2003, 07:40 AM is there one comand that you use to find the length? Jona 06-27-2003, 09:39 AM Originally posted by Justin is there one comand that you use to find the length? No there is not, but you can just open the file in any media player and it should give the amount of minutes/seconds, and all you have to do is multiply the minutes times 60 and add the seconds. [Jona] scoon68 09-18-2004, 02:31 PM Forgive me, but I am kind of new to this web stuff. But I am working on a project. I know this can be done with Java. This is the thread that is closest to what I need. I need a drop down box and a select button. Whatever is slected from the list, is then played in media player. Help is appreciated. Warren86 09-19-2004, 08:23 AM Scoon: I wrote the following code to embed Windows Media Player and use it as an MP3 Jukebox, with a pull-down list, and a button to play all the songs. <HTML> <Head> <Script Language=JavaScript> function PlaySong(fName){ document.Player.filename = fName; document.Player.play(); } function GetSelection (selSelectObject){ data = selSelectObject.options[selSelectObject.selectedIndex].value PlaySong(data); } </Script> </Head> <Body> <center> <h3>MP3 Jukebox</h3> </center> <Table width ='700' align='center' height='50'> <TR> <TD align='center'> <input type='button' value='Play The Entire List' onClick="PlaySong('PlayList.wax')"> </TD> <TD id='PullDown' align='center'> <SELECT name='SongList' onchange='GetSelection(this)'> <option selected value='null'>Or, Choose One</option> <option value='song1.mp3'>Song 1</Script></option> <option value='song2.mp3'>Song 2</Script></option> <option value='song3.mp3'>Song 3</Script></option> <option value='song4.mp3'>Song 4</Script></option> <option value='song5.mp3'>Song 5</Script></option> </select> </TD> <TD align='center'> <Object ID='Player' width='170' height='45' ClassID='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95' Type='applicaton/x-oleobject'> <Embed Type ='application/x-mplayer2' Src='null.wax' Name='Player' </Embed></Object> </TD> </TR> </Table> </Body> </HTML> You must create the PlayList.wax file using Notepad or an other text editor. Here's how: <ASX version ="3.0"> <Entry> <Ref href="song1.mp3"/> </Entry> <Entry> <Ref href="song2.mp3"/> </Entry> <Entry> <Ref href="song3.mp3"/> </Entry> <Entry> <Ref href="song4.mp3"/> </Entry> <Entry> <Ref href="song5.mp3"/> </Entry> </ASX> Copy and paste the above code, adjust the number of Entries as necessary, then save the file as PlayList.wax scoon68 10-09-2004, 11:04 PM Thanks I will try. I was on vacation for some time. Chenoa 10-11-2004, 03:26 AM Hi ok how about this? :) I have a poetry forum and want to make it possible for the residents to choose music from a drop down box and have it added to their post.I saw it at another site once,it gave options for bg's,images,font and music.All you had to do was select and when poem went on,it was accompanied by music and whatever you chose.I have been EVERYWHERE trying to get help on this.I would be ever so grateful for some help and so would my members..Thank you Chenoa Chenoa 10-11-2004, 03:40 AM Hi ok how about this? :) I have a poetry forum and want to make it possible for the residents to choose music from a drop down box and have it added to their post.I saw it at another site once,it gave options for bg's,images,font and music.All you had to do was select and when poem went on,it was accompanied by music and whatever you chose.I have been EVERYWHERE trying to get help on this.I would be ever so grateful for some help and so would my members..Thank you Chenoa webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |