Verticial Marquee

  • Jako
  • Banned
  • Banned
  • Jako
  • Posts: 227

Post 3+ Months Ago

I have the correct code for it, but I forgot how to make it pause when you move the mouse over it.

Code: [ Select ]
<marquee scrollamount="1" scrolldelay="10" direction="up" width="200" height="50" style="font-family: Verdana; font-size: 8pt">Test</marquee>


Trying to do this in simple html, not using JS etc.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

I've never seen a marquee element before, but <b>try</b> adding this:
Code: [ Select ]
<marquee scrollamount="1" scrolldelay="10" direction="up" width="200" height="50" style="font-family: Verdana; font-size: 8pt" onmouseover="this.scrolldelay=0" onmouseout="this.scrolldelay=10">Test</marquee>


It might be scrollDelay or something, and it may not even work - I'm stabbing in the dark here, but it's worth a shot :D
  • Jako
  • Banned
  • Banned
  • Jako
  • Posts: 227

Post 3+ Months Ago

nope, didn't work. But thanks anyways.

Does anyone else no how.
  • Jako
  • Banned
  • Banned
  • Jako
  • Posts: 227

Post 3+ Months Ago

I just decided to go w/ JS version instead of HTML. Thanks anyways
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Posts: 524
  • Loc: NC, USA

Post 3+ Months Ago

Well Jako...you mind filling us in on the js version. You got my intrest peeked at this point...
  • Jako
  • Banned
  • Banned
  • Jako
  • Posts: 227

Post 3+ Months Ago

Sure, here's the code I used.

Code: [ Select ]
</style><script language="JavaScript1.2">

/*
Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/

//Specify the marquee's width (in pixels)
var marqueewidth="180px"
//Specify the marquee's height
var marqueeheight="200px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=1
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//Specify the marquee's content
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

var marqueecontent='<font face="Verdana">test</font>'


////NO NEED TO EDIT BELOW THIS LINE////////////

marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
var actualheight=''
var cross_marquee, ns_marquee

function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualheight=cross_marquee.offsetHeight
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.top=parseInt(marqueeheight)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualheight=ns_marquee.document.height
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate

function scrollmarquee(){

if (iedom){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}
else if (document.layers){
if (ns_marquee.top>(actualheight*(-1)+8))
ns_marquee.top-=copyspeed
else
ns_marquee.top=parseInt(marqueeheight)+8
}
}

if (iedom||document.layers){
with (document){
if (iedom){
write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px;width:100%;">')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee">')
write('<layer name="ns_marquee2" width='+marqueewidth+' height='+marqueeheight+' left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
}
}
</script>
  1. </style><script language="JavaScript1.2">
  2. /*
  3. Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
  4. For full source code, 100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com
  5. Credit MUST stay intact
  6. */
  7. //Specify the marquee's width (in pixels)
  8. var marqueewidth="180px"
  9. //Specify the marquee's height
  10. var marqueeheight="200px"
  11. //Specify the marquee's marquee speed (larger is faster 1-10)
  12. var marqueespeed=1
  13. //Pause marquee onMousever (0=no. 1=yes)?
  14. var pauseit=1
  15. //Specify the marquee's content
  16. //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
  17. var marqueecontent='<font face="Verdana">test</font>'
  18. ////NO NEED TO EDIT BELOW THIS LINE////////////
  19. marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
  20. var copyspeed=marqueespeed
  21. var pausespeed=(pauseit==0)? copyspeed: 0
  22. var iedom=document.all||document.getElementById
  23. var actualheight=''
  24. var cross_marquee, ns_marquee
  25. function populate(){
  26. if (iedom){
  27. cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
  28. cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
  29. cross_marquee.innerHTML=marqueecontent
  30. actualheight=cross_marquee.offsetHeight
  31. }
  32. else if (document.layers){
  33. ns_marquee=document.ns_marquee.document.ns_marquee2
  34. ns_marquee.top=parseInt(marqueeheight)+8
  35. ns_marquee.document.write(marqueecontent)
  36. ns_marquee.document.close()
  37. actualheight=ns_marquee.document.height
  38. }
  39. lefttime=setInterval("scrollmarquee()",20)
  40. }
  41. window.onload=populate
  42. function scrollmarquee(){
  43. if (iedom){
  44. if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
  45. cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
  46. else
  47. cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
  48. }
  49. else if (document.layers){
  50. if (ns_marquee.top>(actualheight*(-1)+8))
  51. ns_marquee.top-=copyspeed
  52. else
  53. ns_marquee.top=parseInt(marqueeheight)+8
  54. }
  55. }
  56. if (iedom||document.layers){
  57. with (document){
  58. if (iedom){
  59. write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
  60. write('<div id="iemarquee" style="position:absolute;left:0px;top:0px;width:100%;">')
  61. write('</div></div>')
  62. }
  63. else if (document.layers){
  64. write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee">')
  65. write('<layer name="ns_marquee2" width='+marqueewidth+' height='+marqueeheight+' left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
  66. write('</ilayer>')
  67. }
  68. }
  69. }
  70. </script>


Found it on dynamicdrive.com

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 106 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.