PDA

View Full Version : Mike's DHTML scroller



compufriend
11-11-2010, 01:25 PM
Hi , this script is great, however looking to make one change.

I need to aamend scrolling information so that the font colours are different.

Example:

The breakfast is great, will return to your B&B again
Jeff Tolman - London

Require: Jeff Tolman - London , bold and in different colour to the comment.

Can anyone help

http://www.dynamicdrive.com/dynamicindex2/mikescroll.htm

jscheuer1
11-11-2010, 02:35 PM
Note: This scroller isn't very cross browser, and requires quirks mode (no valid URL DOCTYPE, no HTML 5 DOCTYPE) to run properly in those browsers where it does work. Consider updating to a more recent scroller script.

That said - One way (just make sure to also increase the height of the scroller as shown, changes highlighted):


<script language="JavaScript">

/*
Mike's DHTML scroller (By Mike Hall)
Last updated July 21st, 02' by Dynamic Drive for NS6 functionality
For this and 100's more DHTML scripts, visit http://www.dynamicdrive.com
*/

//SET SCROLLER APPEARANCE AND MESSAGES
var myScroller1 = new Scroller(0, 0, 480, 64, 1, 5); //(xpos, ypos, width, height, border, padding)
myScroller1.setColors("#006600", "#ccffcc", "#009900"); //(fgcolor, bgcolor, bdcolor)
myScroller1.setFont("Verdana,Arial,Helvetica", 2);
myScroller1.addItem('<span style="color:black;">The breakfast is great, will return to your B&B again</span><br><b style="color:red;">Jeff Tolman - London</b>');
myScroller1.addItem("<b>Visit <a href='http://www.brainjar.com'>Brain Jar</a>, Mike\'s great coding site!</b>");
myScroller1.addItem("<b>Looking for free JavaScripts? Visit <a href='http://javascriptkit.com'>JavaScript Kit.</a>");
myScroller1.addItem("<b>Discuss and get help on web coding, at <a href='http://www.codingforums.com'>CodingForums.com</a></b>");

//SET SCROLLER PAUSE
myScroller1.setPause(2500); //set pause beteen msgs, in milliseconds

function runmikesc . . .

compufriend
11-11-2010, 02:54 PM
Thank you very kindly for your help, much appreciated.