PDA

View Full Version : Need to add extra message to scroll - http://www.dynamicdrive.com/dynamicindex2/cross



amyran
01-05-2011, 07:38 PM
1) Script Title: Pausing Up-Down Scrolling

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/crosstick.htm

3) Describe problem:
This coding is set up for 3 different messages. Since I am new to this coding, I am having a problem figuring out how to add a 4th message to this coding. Thank you for your assistance.

Nile
01-05-2011, 10:34 PM
Just copy one of the lines making the revisions below (changing the 2 to the 3, changing highlighted)


var pausecontent=new Array()
pausecontent[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!'
pausecontent[1]='<a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.'
pausecontent[2]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.'
pausecontent[3]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.'

ddadmin
01-05-2011, 11:31 PM
As Nile mentioned, simply extend the "pausecontent" array with a 4th or 5th element. The following shows this for two different content arrays:


var pausecontent=new Array()
pausecontent[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!'
pausecontent[1]='<a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.'
pausecontent[2]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.'
pausecontent[3]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.'

var pausecontent2=new Array()
pausecontent2[0]='<a href="http://www.news.com">News.com: Technology and business reports</a>'
pausecontent2[1]='<a href="http://www.cnn.com">CNN: Headline and breaking news 24/7</a>'
pausecontent2[2]='<a href="http://news.bbc.co.uk">BBC News: UK and international news</a>'
pausecontent2[3]='<a href="http://news.bbc.co.uk">BBC News: UK and international news</a>'