• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Music Script, On/Off, Cookies, Images


Bow Down to the King
Political User
Okay, I give up. I'm lost.

A client of mine wants music on her site. I told her she should provide the user with an on/off button that will remember their selection (stupid me -- I thought it would be easier).

I have the two images (GIF) and the song (MP3), but that's as far as I've gotten.

When the music is playing I need it to show the music on image. When it is off I need it to show the muted image. I need this script to work using cookies so the script will remember if the user wants to hear the music.

Hopefully you know what I mean. Thank you.


I may actually be insane.
Take a look at the collapser I made for the front page last week: http://osnn.net/collapser.js

I think it's along the same lines as what you want, however I wouldn't know how to stop the music once it's playing (dependant on the embedding method, that is).

Hope that helps some.

Edit: There's also the simpler version of the script available here, http://speedyb.osnn.net/simple_hidy.html
Last edited:


Bow Down to the King
Political User
I'll take a look, thank you.

I'm making some progress. If I could figure out how to make the stupid thing loop, work with cookies, and change the image. That script should help with the latter two.


Bow Down to the King
Political User
Dave, I am using a different method (similar), but this method doesn't require the ActiveX control.

There is no "loop" property, only a "playCount" property. So, I set it to 1000. A value of 0 is supposed to make it loop but that isn't working.

I figured out the images too using JavaScript.

Last thing is the cookies.

Members online

No members online now.

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member