/    Sign up×
Community /Pin to ProfileBookmark

Javascript Jukebox — No errors — no work either??

New topic – old subject.

I’ve been fiddling with a javaScript jukebox I found online. It works on a certain blog site [URL=http://www.xanga.com/]http://www.xanga.com/[/URL] but I can’t get the darn thing to work “standalone”.

My attempts were initially generating various “unterminated string” and “function not defined” errors. Cleanup in a proper editor that dodes unix <CR> only and not DOS <CR><LF> cleaned up the unterminated string errors and changing the name of a button that had the same name as a function being defined later cleared up the undefined function errors.

Now I get NO errors. Not in IE or in FireFox. But it still won’t actually PLAY a defined song.

The running script is at [SIZE=3][COLOR=Red]*LINKS REMOVED — SEE NEXT MESSAGE IN THREAD*[/COLOR][/SIZE] and also downloadable at [SIZE=3][COLOR=Red]*LINKS REMOVED — SEE NEXT MESSAGE IN THREAD*[/COLOR][/SIZE]

If it would help I can attach it here but I see no reason to load someone else’s server with code snips when I have a working place to put them.

Thanks all,

Gerald

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@Phorce1authorJul 21.2005 — OK, that's odd. It DID work for me when installed on the xanga.com blog pages. But not on a standalone web page. I fiddled with a different one that put the Media Player display on page so I could right click and get the PROPERTIES and ERRORS dialogs.

mp3 codec was missing from my Media Player install here and I had auto-codec turned off. Couldn't even play an mp3 directly in Media Player (I use WinAmp on this box) <sigh>.

Downloaded the codec and now the jukebox works fine in IE and my ActiveX enabled copy of FireFox. I still have NO idea why it worked fine in both from the Xanga.com pages even with the missing codec though.

I'll bet everyone who read this and tried it was laughing your a$$es off because it worked fine for you.

Now, could someone look at the code and see if I can add 2 things?

  • 1. Volume control


  • I have these in there (starting at line 16) but get no control display:

    <param NAME="ShowControls" VALUE="1">

    <param NAME="ShowStatusBar" VALUE="1">

    <param NAME="ShowDisplay" VALUE="1">

    <param NAME="DefaultFrame" VALUE="Slide">

    I don't understand "DefaultFrame" -- looking for MediaPlayer ActiveX property lists on Google now. <-- nevermind, found it, removed it corrected line numbers in this message

  • 2. The ability to have it switch songs when it hits the end of one rather than just looping or stopping.


  • And, a way to make it not autostart on initial load (but still switch songs and start if one has already started it) and still work correctly. Auto-starting sounds are annoying.

    If I change this:

    var playstate = 1;

    to this:

    var playstate = 2;

    at line 68 then it doesn't autostart (hooray!) -- but, in order to SELECT ANOTHER SONG one *MUST* hit the "STOP" button before one can get the new selection to play. If I leave the initial playstate set to '1' (autostart) then one can select a new song from the list and hit "PLAY" and it will start the new song.

    And if (at line 19) I set:

    param NAME="Autostart" VALUE="1"

    to:

    param NAME="Autostart" VALUE="0"

    it won't play at all, even when hitting the "PLAY" button.

    I'm editing the original message to remove references to the .zipped source. It's not there anymore. To see the source right click on the link below and use "Save As". It's a 5K completely self contained html/javascript page.

    [URL=http://www.phorce1.us/playtest/player.htm]http://www.phorce1.us/playtest/player.htm[/URL]

    It's also attached here with a .txt extension

    [upl-file uuid=bab82797-6cc2-47c3-9c87-ebfac924c112 size=6kB]player.txt[/upl-file]
    ×

    Success!

    Help @Phorce1 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 5.18,
    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: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

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

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...