/    Sign up×
Community /Pin to ProfileBookmark

Can’t get MP3 Playlist Java Script to Work

I am having problems getting my MP3 playlist to function. I can’t tell what I am doing wrong and have been working at it forever it seems. It just won’t play the songs from the drop down menu on the main page. Can someone please visit my site and tell me what I am doing wrong.

Also, if possible, could you tell me how to edit the size and vertical placement of the form.

Thank you so much

[[email protected]][email protected][/EMAIL] [URL=http://www.angelrodriquez.com/index2.html]www.angelrodriquez.com[/URL]

to post a comment
JavaScript

19 Comments(s)

Copy linkTweet thisAlerts:
@chrismartzApr 12.2004 — the song is playing when i choose a song and click the play button....it just takes a little bit to download the music because the file is so large....but....it is playing....try pre-loading the music file like you can do with images
Copy linkTweet thisAlerts:
@soshibbyliciousauthorApr 12.2004 — How do I preload the music and images?


[[email protected]]Angel[/EMAIL] [URL=http://angel.phenominet.com/index2.html]angelrodriquez.com[/URL]
Copy linkTweet thisAlerts:
@chrismartzApr 12.2004 — try this:
[CODE]<script language="javascript">
<!--
var mysongs=new Array()
function preloadsongs(){
for (i=0;i<preloadsongs.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadsongs.arguments[i]
}
}
preloadsongs("http://angel.phenominet.com/music/The-Darkness-I-Believe.mp3","","","");
//--></script>
<body onload="preloadimages()">[/CODE]

if you need more than one preloaded, in the preloaded songs where the first song is listed:preloadsongs("http://angel.phenominet.com/music/The-Darkness-I-Believe.mp3","","","");[/QUOTE] put the song link in each one of the "" in the parenthesis....if you need further help, post again....i'll try to help
Copy linkTweet thisAlerts:
@soshibbyliciousauthorApr 12.2004 — so i just put this in the header and it will also preload all images on the page as well? i am just wondering because if this is the case, i would like to preload all images on my pages.
Copy linkTweet thisAlerts:
@chrismartzApr 12.2004 — yes....i'm pretty sure it should work....if you have any problems with it....post again
Copy linkTweet thisAlerts:
@soshibbyliciousauthorApr 12.2004 — what can i cut from the script if i have no songs but just images to preload?
Copy linkTweet thisAlerts:
@chrismartzApr 12.2004 — there is nothing to cut from that script for images only....it will preload anything in it....guess i'm not sure what you mean
Copy linkTweet thisAlerts:
@soshibbyliciousauthorApr 12.2004 — i mean what if i just want to preload images on a website that has no need to preload music. do i still need all thos lines that give reference to preloading "mysongs"
Copy linkTweet thisAlerts:
@chrismartzApr 12.2004 — yes....you still need all of that....you can rename the functions but i would leave as is....
Copy linkTweet thisAlerts:
@soshibbyliciousauthorApr 12.2004 — I just added the preload script and it says there is an error on the page but I can't tell what it is. Can you please help?


[URL=http://angel.phenominet.com/index2.html]angelrodriquez.com[/URL]
Copy linkTweet thisAlerts:
@chrismartzApr 12.2004 — could you attach the html code so i can look at it and decide what the problem is?
Copy linkTweet thisAlerts:
@soshibbyliciousauthorApr 13.2004 — Here is the coding (attatched)

It's not preloading anything and there is an error on the page.

Thanks for all your help.

Angel

[upl-file uuid=7ee627ef-b915-4f20-92f4-571941f09450 size=4kB]contents.txt[/upl-file]
Copy linkTweet thisAlerts:
@chrismartzApr 13.2004 — this is what i changed....but you can just download it and use the txt file

its the edited txt file below
[CODE]
<script language="javascript">
<!--
var mysongs=new Array()
function preloadsongs(){
for (i=0;i<preloadsongs.arguments.length;i++){
mysongs[i]=new Image()
mysongs[i].src=preloadsongs.arguments[i]
}
}
preloadsongs("http://angel.phenominet.com/music/The-Darkness-I-Believe.mp3","","","");
//--></script>
<body onload="preloadimages()">
[/code]

try this!!!

by the way....are you aloud to play these songs, legally?

[upl-file uuid=4212be8e-fb32-4a04-9621-ff205cf39db0 size=4kB]contents.txt[/upl-file]
Copy linkTweet thisAlerts:
@soshibbyliciousauthorApr 13.2004 — It still keeps saying there is an error on the page. I am not exactly sure where it is coming from. Could you please look at the file again (attatched is a more current version I am using)

It loads everything fine but I still get an error icon when I load it in Explorer.


Angel


BTW, I looked into the music thing and its legal due to the fact that I am not advocating the actual download of files and am merely using small samplings

[upl-file uuid=b8e06ddb-037a-4d07-a144-b82ba1ba80e0 size=4kB]contents[1].txt[/upl-file]
Copy linkTweet thisAlerts:
@soshibbyliciousauthorApr 13.2004 — the details of the error reads:



Line: 75

Char: 1

Error: Object Expected

Code: 0

URL: http://angel.phenominet.com/contents.html
Copy linkTweet thisAlerts:
@chrismartzApr 13.2004 — i'm not really sure what is wrong....when i open your site...i do not get any errors....i'll keep working with it to get it to error for me and then maybe i can fix it
Copy linkTweet thisAlerts:
@chrismartzApr 13.2004 — okay...think i might have got it....try the new and improved one below:

[upl-file uuid=5607ff50-e986-4038-ba1f-d5dbeb9f8f51 size=4kB]contents[1][1].txt[/upl-file]
Copy linkTweet thisAlerts:
@soshibbyliciousauthorApr 14.2004 — Well no errors anymore, but it really doesn't seem to be preloading anything


Is that what youve experienced?
Copy linkTweet thisAlerts:
@chrismartzApr 20.2004 — yea....it seems to be the same timespan....it should work though.....it is the right code.....dunno what else to do!....srri
×

Success!

Help @soshibbylicious spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...