Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 Background music
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

charlie_t1010
Novice

9 Posts

Posted - 13 Feb 2004 :  23:34:13  Show Profile  Visit charlie_t1010's Homepage  Reply with Quote
How would I add background music to play as you enter my site and have a button to shut it off if it annoys anyone. Please reply i'm new so I dont know to much about the program.

Edited by - on

s.dav
Site Admin

Italy
3364 Posts

Posted - 14 Feb 2004 :  09:57:15  Show Profile  Visit s.dav's Homepage  Reply with Quote
quote:
Originally posted by charlie_t1010

How would I add background music to play as you enter my site and have a button to shut it off if it annoys anyone. Please reply i'm new so I dont know to much about the program.



Hello charlie_t1010,
Dynamic HTML Editor 1.7 haven't a good music management so if you want you can do it 'by hands'.

- Create an HTML object and put this string in

<EMBED ID="mysong" HIDDEN='true' AUTOSTART='true' WIDTH='10' HEIGHT='10' SRC='songName.WAV' LOOP='true' REPEAT='true' VOLUME='100'></EMBED>

- change "songname.wav" in yoursong name
- note that you must copy yoursong to export directory elsewhere you can't hear nothing

- go to 'page properties' under the "HTML Head Code" and put this functions into an <script> tag (taken from CoolPage 2.71 program ;-))


<SCRIPT LANGUAGE=javascript>
<!--

var agt=navigator.userAgent.toLowerCase();
var is_major=parseInt(navigator.appVersion);
var is_minor=parseFloat(navigator.appVersion);
var is_nav=((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1));
var is_ie=(agt.indexOf('msie')!=-1);
if(is_ie){var agt_ie=agt.substring(agt.indexOf('msie')+5); is_major=parseInt(agt_ie); is_minor=parseFloat(agt_ie);}
var is_dom2=(document.getElementById);
var is_http=(window.location.protocol.indexOf('http')==0);
function jsStop( o ) { if(is_ie&&is_major>=4&&eval('document.'+o)){var e=eval('document.'+o);if(e.src&&e.src!=''&&e.ReadyState&&e.ReadyState>=4){e.stop();}}else{if(is_nav&&is_major>=3&&(is_major<4||eval('document.'+o))){eval('document.'+o+'.stop()');}} }
function jsPlay( o ) { if(is_ie&&is_major>=4&&eval('document.'+o)){var e=eval('document.'+o);if(e.src&&e.src!=''&&e.ReadyState&&e.ReadyState>=4){if(is_major>=5){e.play();}else{e.run();}}}else{if(is_nav&&is_major>=3&&(is_major<4||eval('document.'+o))){eval('document.'+o+'.play(false)');}} }

//-->
</SCRIPT>




- Now the page is ok
- If you want to stop the music you can create an object that support events and edit the onclick event.
- Put into JavaCall the string : jsPlay('mysong'); and the song stops

Regards, Davide

Edited by - on
Go to Top of Page

charlie_t1010
Novice

9 Posts

Posted - 16 Feb 2004 :  00:52:31  Show Profile  Visit charlie_t1010's Homepage  Reply with Quote
Thank you!

Edited by - on
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000