Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 33

Thread: Scheuer Toggle Sound Script II FireFox Problem

  1. #11
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Hi, I'm using "Toggle Sound Script III 2008" in my website but I've some problems. The script and buttons works and show perfectly in IE, Safari and Chrome but in Mozilla Firefox (v 8.0.1) the clip (mp3) doesn't play. The code in my index.html is:

    Into "head" tag:

    Code:
    <script type="text/javascript">
    
    /*Toggle Sound Script III 2008 John Davenport Scheuer
      as first seen in www.dynamicdrive.com/forums (user name:
      jscheuer1). Visit http://www.dynamicdrive.com for 100's
      of DHTML scripts.  This credit must remain for legal use.
      */
    
    var sndEl="music/music.mp3"  //Set to name and path of your sound file
    var music_on="images/altavoz.png"		//Set to image to display while music is on
    var music_off="images/altavoz2.png"	//Set to image to display while music is off
    var active_img="altavoz.png"	//Set to image to display while image is hovered
    
    ///////////////Stop Editing///////////////
    
    var mpIsInstalled = false;
    if (window.ActiveXObject) {
        var control = null;
    /*@cc_on @*/
    /*@if(@_jscript_version >= 5)
        try {
            control = new ActiveXObject('WMPlayer.OCX');
        } catch (e) {}
    @end @*/
        if (control&&control.versionInfo) {
            mpIsInstalled = true;
        }
        }
    
    var da=document.all
    var preload=[music_on, music_off, active_img]
    var preloading=new Array();
    for (var i_tem = 0; i_tem < preload.length; i_tem++){
    preloading[i_tem]=new Image();
    preloading[i_tem].src=preload[i_tem]
    }
    
    function textReveal(el, state){
    var text=da? da.text : document.getElementById('text')
    text.style.visibility=state=='on'? 'visible' : ''
    el.src=state=='on'? active_img : el.lowsrc
    }
    
    function toggleSound(el){
    var text=da? da.text : document.getElementById('text')
    if(mpIsInstalled){
    if(text.innerHTML=='&nbsp;Music Off'){
    toggleSound.p=sound.controls.currentPosition;
    sound.controls.stop();
    el.lowsrc=music_off;
    text.innerHTML='&nbsp;Music On';
    }
    else{
    sound.URL=sndEl;
    if(toggleSound.p)
    sound.controls.currentPosition=toggleSound.p;
    el.lowsrc=music_on;
    text.innerHTML='&nbsp;Music Off';
    }
    }
    else if (da&&da.sound&&(da.sound.src!==''||!toggleSound.l)){
    toggleSound.l=true;
    da.sound.src=''
    el.lowsrc=music_off
    text.innerHTML='&nbsp;Music On'
    }
    else if (document.getElementById('snd')){
    sndEl=document.getElementById('snd')
    document.getElementById('sndC').removeChild(sndEl)
    el.lowsrc=music_off
    text.innerHTML='&nbsp;Music On'
    }
    else if (da&&da.sound&&da.sound.src==''){
    da.sound.src=sndEl
    el.lowsrc=music_on
    text.innerHTML='&nbsp;Music Off'
    }
    else {
    document.getElementById('sndC').appendChild(sndEl)
    el.lowsrc=music_on
    text.innerHTML='&nbsp;Music Off'
    }
    }
    ;(function(){
    var f = function(){toggleSound(document.images.bob);
    if(document.getElementById&&document.getElementById('sndC'))
    document.getElementById('sndC').style.display='';
    toggleSound(document.images.bob);
    document.images.bob.src = document.images.bob.lowsrc;};
    if (window.addEventListener){
    	window.addEventListener('load', f, false);
    }
    else if (window.attachEvent){
    	window.attachEvent('onload', f);
    }
    })();
    
    </script>
    Into "body" tag:

    Code:
    <!-- Begin Toggle Sound Body Code -->
    <!--[if IE]>
    <script type="text/javascript">
    if(mpIsInstalled)
    document.write('<object id="sound" height="0" width="0"'+
    '  classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">\n'+
    '<param name="playCount" value="20000">\n'+
    '<\/object>\n');
    else
    document.write('<bgsound id="sound" src="" loop="-1">')
    </script>
    <![endif]-->
    
    <script type="text/javascript">
    if (document.getElementById&&!document.getElementById('sound')){
    document.write('<div id="sndC" style="width:0;height:0;position:absolute;top:-1000px;left:-1000px;visibility:hidden;display:none;">')
    document.write('<embed id="snd" type="audio/wav" style="width:0;height:0;position:absolute;top:-1000px;left:-1000px;visibility:hidden;" src="'+sndEl+'" 
    
    autostart="true" hidden="true" loop="true">')
    document.write('<\/div>')
    }
    if ((da&&da.sound)||document.getElementById)
    document.write('<img id="bob" name="bob" style="cursor:pointer;" lowsrc="'+music_on+'" src="'+music_off+'" onmouseout="textReveal(this, \'off\')" 
    
    onmouseover="textReveal(this, \'on\');" onclick="toggleSound(this);"><span id="text">&nbsp;Music Off<\/span>')
    </script>
    <!-- End Toggle Sound Body Code -->
    What I'm doing wrong? Thanks and sorry for my poor English.

  2. The Following User Says Thank You to SpankThru For This Useful Post:

    sameh_gpc (01-12-2012)

  3. #12
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    You're not doing anything wrong. The script no longer works in Firefox, some others. I was just playing around with the HTML 5 audio tag. It looks promising as a way to include more modern browsers. It works in Opera, Firefox, IE 9, Chrome, probably Safari, probably some others. I just have to figure out how to integrate it into the script. When I have more time, I may do that. But it looks to be more of a major rewrite, as that script is rather dated just in general.

    If you don't hear back from me in this thread in a week or so, feel free to post a reminder.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #13
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Ok. In Firefox no works because it depends of Quicktime. Yesterday I did a tons of test with many versions of quicktime and the result was:

    - In Windows 7, with Firefox 8.0 (last) and Quicktime 7 (last) the script works perfectly.
    - In Mac with Firefox 8.0 (last) and Quicktime 10 (last for mac) the script does not work.

    In Mac Quicktime 10 is installed with SO, then I can't uninstall it to reinstall 7 version. Then the script works in firefox only if you have Quicktime 7 in your system.

    My theory: In Opera, IE9, Chrome and Safari the scripts work because it depends of a Quicktime plugin, not the Quicktime program directly. In Firefox I think that the Quicktime plugin needs Quicktime installed on SO to work.

    Hope this info will help you to fix de script, because I'm searching for another one and this is the best. Sadly I've to choice a flash music button (I don't like flash hehe) to my site because I don't want that my visitors depend of Quicktime version to play/switchon/off music.

    Anyway thanks for work on this script, it was useful for me

  5. #14
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Here's the demo (same images as before, I think. Double check those in the defaults section to be sure.):

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title>Toggle Sound - Demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="shortcut icon" href="http://home.comcast.net/~jscheuer1/favicon.ico" />
    <style type="text/css">
    	.togglesoundtext {
    	font-family: verdana, arial, sans-serif;
    	font-size: 80%;
    	position: relative;
    	top: -12px;
    	color: gray;
    }
    h2 {
    	border: 1px solid #666;
    	margin: 0;
    	padding: 5px;
    	display: inline-block;
    	font: bold 110% verdana, arial, helvetica, sans-serif;
    }
    </style>
    <script type="text/javascript">
    
    // Cross Toggle Sound Script IV (c)2011 John Davenport Scheuer
    // as first seen in www.dynamicdrive.com/forums (user name:
    // jscheuer1). Visit http://www.dynamicdrive.com for 100's
    // of DHTML scripts.  This credit must remain for legal use.
    
    var CrossToggleSound = function(cfg){
    	if(!document.getElementById) {return;}
    	var defaults = {
    		id: 'crosstogglesound', // id of element to put the toggle sound images and text in
    		ogg_sound: 'sounds/welcome.ogg', // location of .ogg version of sound file
    		mp3_sound: 'sounds/welcome.mp3', // location of .mp3 version of sound file
    		music_on: 'music_on1s_o.gif', // image to display while music is on
    		music_off: 'music_off1s_o.gif', // image to display while music is off
    		active_img: 'active_img1_o.gif', // image to display while image is hovered
    		text_on: '&nbsp;Turn Music Off', // HTML text to show on hover when music is on
    		text_off: '&nbsp;Turn Music On', // HTML text to show on hover when music is off
    		touch_screen_text_on: '&nbsp;Tap to Turn Music Off', // HTML text for touch screens when music is on
    		touch_screen_text_off: '&nbsp;Tap to Turn Music On', // HTML text for touch screens when music is off
    		start_music_onload: true, // music to begin on page load (true/false) - overrides to false for touch screens
    
    	/////////////// End Editable Defaults - Stop Editing ///////////////
    
    		html5: (function(){
    			var html5 = document.createElement('audio');
    			return typeof html5.play === 'function'? html5 : false;
    		})()
    	},
    	ie = CrossToggleSound.ie, touch = CrossToggleSound.touch, cts = this, preloading = [], control = null, preload, i, p;
    	cfg = typeof cfg === 'object'? cfg || {} : {};
    	for(p in defaults){
    		if(cfg.hasOwnProperty && !cfg.hasOwnProperty(p) || !cfg.hasOwnProperty && !cfg[p]){
    			cfg[p] = defaults[p];
    		}
    	}
    	if(touch){cfg.start_music_onload = false;}
    	if(!(cfg.container = document.getElementById(cfg.id))) {return;}
    	this.cfg = cfg;
    	preload = [cfg.music_on, cfg.music_off, cfg.active_img];
    	for (i = preload.length - 1; i > -1; --i){
    		preloading[i] = new Image();
    		preloading[i].src = preload[i];
    	}
    	cfg.mpIsInstalled = false;
    	if(ie){
    		/*@cc_on @*/
    		/*@if(@_jscript_version >= 5)
    		try {
    			control = new ActiveXObject('WMPlayer.OCX');
    		} catch (e) {}
    		@end @*/
    		if(control && control.versionInfo){
    			cfg.mpIsInstalled = document.createElement('object');
    			control = null;
    		}
    	}
    	cfg.bgsound = (function(){
    		return ie && !cfg.html5 && !cfg.mpIsInstalled? document.createElement('bgsound') : false;
    	})();
    	while (cfg.container.lastChild){
    		cfg.container.removeChild(cfg.container.lastChild);
    	}
    	if(cfg.html5){
    		cfg.html5.loop = 'loop';
    		cfg.html5.controls = 'controls';
    		cfg.html5.style.height = cfg.html5.style.width = 0;
    		cfg.html5.style.position = 'absolute';
    		cfg.html5.style.top = '-1000px';
    		cfg.html5.id = cfg.id + 'audio';
    		cfg.src1 = document.createElement('source');
    		cfg.src2 = cfg.src1.cloneNode(false);
    		cfg.src1.src = cfg.ogg_sound;
    		cfg.src1.type = 'audio/ogg';
    		cfg.src2.src = cfg.mp3_sound;
    		cfg.src2.type = 'audio/mp3';
    		cfg.html5.appendChild(cfg.src1);
    		cfg.html5.appendChild(cfg.src2);
    		cfg.container.appendChild(cfg.html5);
    		if(!/loop/.test(cfg.container.innerHTML)){ // fix for Firefox (perhaps others) not assigning loop as a property, and not respecting it as an attribute
    			this.addEvent(cfg.html5, 'ended', function(){cfg.html5.play();});
    		}
    		document.body.insertBefore(cfg.html5, document.body.firstChild);
    	} else if(cfg.mpIsInstalled){
    		if(ie < 7 && !/\/\//.test(cfg.mp3_sound)){ // if IE 6 or less and mp3 path not absolute
    			cfg.mp3_sound = location.href.replace(/[^\/]*$/, '') + cfg.mp3_sound;
    		}
    		cfg.mpIsInstalled.id = cfg.id + 'mp';
    		cfg.mpIsInstalled.style.height = cfg.mpIsInstalled.style.width = 0;
    		cfg.mpIsInstalled.classid = 'CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6';
    		cfg.container.appendChild(cfg.mpIsInstalled);
    	} else if(cfg.bgsound) {
    		cfg.bgsound.id = cfg.id + 'bgsound';
    		cfg.bgsound.loop = -1;
    		cfg.container.appendChild(cfg.bgsound);
    	} else {
    		cfg.container.innerHTML = '<div id="' + cfg.id +
    		'embedc" style="width:0;height:0;position:absolute;top:-1000px;left:-1000px;visibility:hidden;display:none;">\n' +
    		'\t<embed id="' + cfg.id +
    		'embed" type="audio/wav" style="width:0;height:0;position:absolute;top:-1000px;left:-1000px;visibility:hidden;" src="' +
    		cfg.mp3_sound + '" autostart="true" hidden="true" loop="true">\n<\/div>\n';
    		cfg.embedc = document.getElementById(cfg.id + 'embedc');
    		cfg.embed = document.getElementById(cfg.id + 'embed');
    		document.body.insertBefore(cfg.embedc, document.body.firstChild);
    	}
    	cfg.im = document.createElement('img');
    	cfg.im.id = cfg.id + 'image';
    	cfg.im.className = 'togglesoundimage';
    	cfg.im.style.cursor = ie && ie < 6? 'hand' : 'pointer';
    	cfg.im.src = cfg.music_off;
    	cfg.im.setAttribute('data-mouseoutim', cfg.music_on);
    	cfg.text = document.createElement('span');
    	cfg.text.id = cfg.id + 'text';
    	cfg.text.className = 'togglesoundtext';
    	cfg.text.style.visibility = touch? 'visible' : 'hidden';
    	cfg.container.appendChild(cfg.im);
    	cfg.container.appendChild(cfg.text);
    	cfg.text.innerHTML = touch? cfg.touch_screen_text_on : cfg.text_on;
    	if(touch){
    		cfg.text.style.cursor = 'pointer';
    		this.addEvent(cfg.text, 'click', function(){cts.toggleSound();});
    	} else {
    		this.addEvent(cfg.im, 'mouseover', function(e){cts.textReveal(e);});
    		this.addEvent(cfg.im, 'mouseout', function(e){cts.textReveal(e);});
    	}
    	this.addEvent(cfg.im, 'click', function(){cts.toggleSound();});
    	this.toggleSound();
    	if(cfg.embedc){cfg.embedc.style.display='';}
    	if(cfg.start_music_onload){
    		this.toggleSound();
    		cfg.im.src = cfg.music_on;
    	}
    };
    
    CrossToggleSound.prototype = {
    	textReveal: function(e){
    		e = e || event;
    		var over = e.type === 'mouseover';
    		this.cfg.text.style.visibility = over? 'visible' : 'hidden';
    		this.cfg.im.src = over? this.cfg.active_img : this.cfg.im.getAttribute('data-mouseoutim');
    	},
    	toggleSound: function(){
    		var cfg = this.cfg, touch = CrossToggleSound.touch, on = cfg.text.innerHTML == cfg.text_on ||
    			cfg.text.innerHTML == cfg.touch_screen_text_on, cts = this;
    		if (cfg.html5){
    			if(on){cfg.html5.pause();} else {cfg.html5.play();}
    		}
    		else if(cfg.mpIsInstalled){
    			if(on){
    				clearInterval(cfg.timer);
    				cfg.p=cfg.mpIsInstalled.controls.currentPosition;
    				cfg.mpIsInstalled.controls.stop();
    			} else {
    				cfg.mpIsInstalled.URL = cfg.mp3_sound;
    				if(cfg.p){cfg.mpIsInstalled.controls.currentPosition = cfg.p;}
    				cfg.timer = setInterval(function(){
    					if(cfg.mpIsInstalled.controls.currentPosition == 0){
    						cfg.mpIsInstalled.URL = cfg.mp3_sound;
    					}
    				}, 1000);
    			}
    		} else if(cfg.bgsound && (cfg.bgsound.src || !cfg.toggleSound)){
    			cfg.toggleSound = true;
    			cfg.bgsound.src = '';
    		}
    		else if(cfg.embed && document.getElementById(cfg.embed.id)) {
    			cfg.embed = cfg.embedc.removeChild(cfg.embed);
    		} else if(cfg.bgsound && !cfg.bgsound.src) {
    			cfg.bgsound.src = cfg.mp3_sound;
    		} else {cfg.embedc.appendChild(cfg.embed);}
    		if(on){
    			cfg.im.setAttribute(touch? 'src' : 'data-mouseoutim', cfg.music_off);
    			cfg.text.innerHTML = touch? cfg.touch_screen_text_off : cfg.text_off;
    		} else {
    			cfg.im.setAttribute(touch? 'src' : 'data-mouseoutim', cfg.music_on);
    			cfg.text.innerHTML = touch? cfg.touch_screen_text_on : cfg.text_on;
    		}
    	},
    	addEvent: (function(){return window.addEventListener? function(el, ev, f){
    			el.addEventListener(ev, f, false);
    		}:window.attachEvent? function(el, ev, f){
    			el.attachEvent('on' + ev, f);
    		}:function(){return;};
    	})()
    };
    
    /*@cc_on @*/
    /*@if(@_jscript_version >= 5)
    	CrossToggleSound.ie = (function(){
    		var ver;
    		if((ver = /MSIE (\d+)/.exec(navigator.userAgent))){
    			return ver[1];
    		}
    		return false;
    	})();
    @end @*/
    
    CrossToggleSound.touch = typeof window.ontouchstart !== 'undefined' || typeof document.ontouchstart !== 'undefined';
    
    </script>
    </head>
    <body>
    <!-- Cross Toggle Sound Division - Place Where Desired -->
    <div id="crosstogglesound">Anything Here Will Be Overwritten unless javascript is disabled or the browser is too old</div>
    <!-- End Cross Toggle Sound Division -->
    <!-- Cross Toggle Sound Body Script - Place as Last Thing Before the Closing </body> Tag -->
    <script type="text/javascript">
    new CrossToggleSound();
    </script>
    <!-- End Cross Toggle Sound Body Script -->
    </body>
    </html>
    See next post for notes.
    Last edited by jscheuer1; 12-31-2011 at 03:57 AM. Reason: debug code for Firefox not looping, later for MP not looping
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #15
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    See previous post for code.

    Well the update is ready. My sympathies for QuackTime™. But sometimes you just have to call a duck a duck.

    The only sort of bad thing with this update is that you need to have two versions of your sound file. One .ogg and another .mp3.

    On the plus side, it's now modular! You can have as many of these as you want on a page, each with different images and texts if you like. One can be on and the others off. Documentation/details on that to follow in another post and/or with a submission, I may make this version official.

    Also, the in body code is now greatly reduced. This makes it easier to position the control where you might want it. And makes it easier to make the main script external, which I will probably do if I submit it to DD.

    And it doesn't have to wait until onload for anything, but you do need to put the in body call after the target div. If the target div is in a table or nested tables, for compatibility with IE 7 and less it needs to come after the outer closing </table> tag. If in doubt, just put it right before the closing </body> tag.

    Remember, you need both a .ogg and a .mp3 file. Free conversion from mp3 to ogg is available lots of places, if you need help with that, let me know. But, as I say, you need both versions of your sound file.

    I had held that post back from it's original post time because shortly after that I discovered that Firefox wasn't looping the file and that Opera was truncating it. I found a solution for Firefox in that though it doesn't respect the audio tag's loop property or attribute, it does apply the onended function. I simply made it so if a browser didn't add the loop property it would add the onended = play(), effectively restoring loop for that browser. It's feature detection not browser sniffing. The thing with Opera was I discovered that if I copied, moved or renamed the .ogg file after having converted it from the mp3 it got truncated in Opera. Fortunately uploading and downloading it didn't do that. So just be careful to convert to ogg to the folder you want it in locally and have the mp3 file you're converting already have the desired filename.

    There's still more explanation to come if you're interested in using this modularly. But for a single sound (single pair of 'matching' .ogg and .mp3 files actually) file it works right out of the box.

    The most recent additions/changes allow it to work with iPhone. I'm hoping that also suffices for Android, but no one has come forward yet to report on that.
    Last edited by jscheuer1; 12-31-2011 at 04:00 AM. Reason: add more notes
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #16
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    thanks for work on this script.

  8. #17
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John, I can't seem to get this version or your older version to start in the off state. (Firefox and html kit) Have tried autostart="false" and autoplay="false" but this has no effect.

  9. #18
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Code:
    <script type="text/javascript">
    
    // Cross Toggle Sound Script IV (c)2011 John Davenport Scheuer
    // as first seen in www.dynamicdrive.com/forums (user name:
    // jscheuer1). Visit http://www.dynamicdrive.com for 100's
    // of DHTML scripts.  This credit must remain for legal use.
    
    var CrossToggleSound = function(cfg){
    	if(!document.getElementById) {return;}
    	var defaults = {
    		id: 'crosstogglesound', // id of element to put the toggle sound images and text in
    		ogg_sound: 'sounds/welcome.ogg', // location of .ogg version of sound file
    		mp3_sound: 'sounds/welcome.mp3', // location of .mp3 version of sound file
    		music_on: 'music_on1s_o.gif', // image to display while music is on
    		music_off: 'music_off1s_o.gif', // image to display while music is off
    		active_img: 'active_img1_o.gif', // image to display while image is hovered
    		text_on: '&nbsp;Turn Music Off', // HTML text to show on hover when music is on
    		text_off: '&nbsp;Turn Music On', // HTML text to show on hover when music is off
    		touch_screen_text_on: '&nbsp;Tap to Turn Music Off', // HTML text for touch screens when music is on
    		touch_screen_text_off: '&nbsp;Tap to Turn Music On', // HTML text for touch screens when music is off
    		start_music_onload: false, // music to begin on page load (true/false) - overrides to false for touch screens
    
    	/////////////// End Editable Defaults - Stop Editing ///////////////
    
    		html5: (function(){
    			var html5 = document.createEle . . .
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #19
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Here's the latest version (Cross Toggle Sound Script V (c)2013 John Davenport Scheuer). I found that the MediaPlayer fallback wasn't working in IE 8 mode of IE 10, which indicates a possible problem with other IE that take the MP path, so I updated that, tested for backward compatibility (it passed) and changed the approach for touch devices a little, giving the mouseover, mouseout visual changes to CSS (:hover pseudo class). The touch devices might render those. If anyone with touch wants to try it out, I'd appreciate that. The latest demo is here:

    http://home.comcast.net/~jscheuer1/m...soundiv-ht.htm

    It has two toggle sound features on it, same sound clip for both. The second one auto plays, except on touch devices. It's just a little too long to post the entire source code of the page here, so if you're interested in it, use your browser's "View Source".

    Oh, and I have permission to use that sound clip. If anyone else has a clip (moderate length, 40 to 120 seconds, something you can listen to a few times without it getting on your nerves too much please) I could legally use without royalty, let me know. I'd like to have a demo with two or more different clips.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  11. #20
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,998
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    12

    Default

    Hi John,

    The script/demo works perfectly here on iPhone 4S - it does exactly what you say, with the 2nd example staying mute too until toggled (on touch-screen)

    I dont have any sample music clips but I just wanted to say nice work

    x
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •