Question

Scrolling Pictures!

Asked by: easynow111

Hi, i'm relatively new to javascript and would like some help if possible!

I would like to create a vertically scrolling strip of pictures! How do i proceed?

I have 10 pictures I would like to have the pictures scroll vertically, when a picture reachs the bottom of the strip, it disappears and gets sent to the back of the line!  (can this be done in javascript or do I need to do it in flash?).

|-----------|                      Any help on this would be much appreciated,     Easynow
|              |
|              |      |
|-----------|     \ /
|              |      v
|              |
|-----------|

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-06-11 at 06:13:44ID20644383
Tags

javascript

Topic

JavaScript

Participating Experts
3
Points
100
Comments
12

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. image and vertical scroll bar.
    I have a .jpg file inside a picturebox control...It is bigger than the picturebox so I thought I would add a vertical scroll bar to scroll so that the whole picture could be viewed. I added the verical scroll bar and at runtime it does not move the image... Any ideas...
  2. javascript picture scrolling menubar
    is there a way ...as in the www.stargateSG-1.com website to create a javascript scrolling picture box that scrolls from 1 side to another??? I am looking for simple code to expand on....as this is my first website and I would like to make it interesting Thanks
  3. Create a vertical Scroll box in Flash
    Hi, I'm after a simple step by step set of instructions that will tell me how to create a vertical scrolling text box in Flash CS3. I then need to be able to embed the item in Adobe Captivate. Thanks

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: jyokumPosted on 2003-06-11 at 06:55:20ID: 8699760

this one scrolls up but probably wouldn't be too hard to reverse.



<style>
.scroll_header { font-size:10px; }
</style>

<script language="JavaScript1.2">

/*
Pausing updown message scroller-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
Terms Of Use, visit http://www.dynamicdrive.com
*/

//configure the below five variables to change the style of the scroller
var scrollerwidth='450px'
var scrollerheight='50px'
var scrollerbgcolor='white'
//set below to '' if you don't wish to use a background image
var scrollerbackground=''

//configure the below variable to change the contents of the scroller
var messages=new Array()
messages[0]="<img src='/help.gif'>"
messages[1]="<img src='/mmc.gif'>"
messages[2]="<img src='/print.gif'>"

///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (messages.length>2)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",4000)
setTimeout("move2(document.main.document.second)",4000)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",100)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(messages[i])
tlayer.document.close()
if (i==messages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",4000)
setTimeout("move1(document.main.document.first)",4000)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",100)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(messages[i])
tlayer2.document.close()
if (i==messages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",4000)
setTimeout("move4(second2_obj)",4000)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",100)
}
else{
tdiv.style.top=parseInt(scrollerheight)
tdiv.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",4000)
setTimeout("move3(first2_obj)",4000)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",100)
}
else{
tdiv2.style.top=parseInt(scrollerheight)
tdiv2.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll

</script>


<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; bgColor=&{scrollerbgcolor}; background=&{scrollerbackground}; visibility=hide>
<layer id="first" left=0 top=1 width=&{scrollerwidth};>
<script language="JavaScript1.2">
if (document.layers)
document.write(messages[0])
</script>
</layer>
<layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide>
<script language="JavaScript1.2">
if (document.layers)
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
</script>
</layer>
</ilayer>

<script language="JavaScript1.2">
if (ie||dom){
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>

 

by: marshmeliPosted on 2003-06-11 at 07:32:49ID: 8700128

this one scrolls up and down, and is easy to use, i have used it before....if u just want it to scroll down then i bet u can just take out all of the function scrolls up... (this code is free to use and u can edit it too):

// ASM SCROLLER 2.0 - (c) 2000 Brent Gustafson, vitaflo.com and assembler.org
//
// Feel free to hack around with this code for personal use, it's open source
// so do what ya want w/ it.  Though a link would be nice. ;)  While this code
// doesn't have a ton of documentation, please remember that I am a busy man,
// so support of this code will be very minimal.  Use at your own risk.
//
// Follow me into a solo, get in the FLO
// And you can picture like a photo
// Music mixed mellow maintains to make
// Melodies for MC's motivates the breaks
// I'm everlasting, I can go on for days and days
// With rhyme displays that engrave deep as X-rays
//
// -Brent (brent@assembler.org)
// assembler.org || vitaflo.com

var w3c = (document.getElementById) ? 1:0
var ns4 = (document.layers) ? 1:0
var ie4 = (document.all) ? 1:0

var range = "";
var cap = "";
var mutex = 0;
var yplace = 0;
var ymax = 0;
var ymin = 0;
var xplace = 0;
var newsHeight = 0;

/** The only code you should ever need to change here are the following 3 vars **/
var speed = 4;                         //speed at which the news scrolls
var newsId = "news";                   //name of the overall news div
var newsClipId = "newsClipping";       //name of the news clipping div

function redrawScreen() {
  location.reload();
  return false
}

function shiftTo(obj, x, y) {
  if (w3c) {
    obj.style.left = x + "px";
    obj.style.top = y + "px";
  }
  else if (ns4) {
       obj.moveTo(x,y);
  }
  else if (ie4) {
    obj.style.pixelLeft = x;
      obj.style.pixelTop = y;
  }
}

function getObject(obj) {
      var theObj = eval("document." + range + obj + cap);
      return theObj;
}

function scrollUp() {
  if (mutex == 1){
    var theObj = getObject(newsId);
    if (yplace < ymax) {
      yplace = yplace + speed;
      if (yplace > ymax) yplace = ymax;
      shiftTo(theObj, xplace, yplace);
      setTimeout("scrollUp()",25);
    }
  }
}
 
function scrollDown() {
  if (mutex == 2){
    var theObj = getObject(newsId);
    if (yplace > ymin) {
      yplace = yplace - speed;
      if (yplace < ymin) yplace = ymin;
      shiftTo(theObj, xplace, yplace);
      setTimeout("scrollDown()",25);
    }
  }
}

function scrollIt(msg, dir) {
  window.status = msg;
  mutex = dir;
  if (mutex == 1) scrollUp();
  else if (mutex == 2) scrollDown();
}

function init() {
  if (w3c) {
    range = "getElementById(\"";
    cap = "\")";
    theObj = getObject(newsClipId);
    newsHeight = parseInt(theObj.offsetHeight);
    theObj = getObject(newsId);
    ymin = (parseInt(theObj.offsetHeight) - newsHeight) * -1;
  }
  else if (ns4) {
    window.captureEvents(Event.RESIZE);
    window.onresize = redrawScreen;
    theObj = getObject(newsClipId);
    newsHeight = theObj.clip.height;
    newsId = newsClipId + ".document." + newsId;
    theObj = getObject(newsId);
    ymin = (theObj.clip.height - newsHeight) * -1;
  }
  else if (ie4) {
    range = "all.";
    theObj = getObject(newsClipId);
    newsHeight = theObj.offsetHeight;
    theObj = getObject(newsId);
    ymin = (theObj.offsetHeight - newsHeight) * -1;
  }
}

// END OF LINE


the script is called ASM_Scroller2.js

here is an example of it in action from the guys site: http://architecture.mit.edu/~phaus1/portfolio/academic02-BP.html

 

by: marshmeliPosted on 2003-06-11 at 07:34:15ID: 8700146

here is a site that i did using this script, it may help....my site looks best in 1152x864 res., but with any res you can get the idea:

http://www.cs.scranton.edu/~acm/

 

by: shofstetterPosted on 2003-06-11 at 07:47:59ID: 8700277

how about this
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>

<div name="div1" id="div1" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic1" src="" id="pic1" alt="">
</div>
<div name="div2" id="div2" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic2" src="" id="pic2" alt="">
</div>
<div name="div3" id="div3" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic3" src="" id="pic3" alt="">
</div>
<div name="div4" id="div4" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic4" src="" id="pic4" alt="">
</div>
<div name="div5" id="div5" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic5" src="" id="pic5" alt="">
</div>
<div name="div6" id="div6" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic6" src="" id="pic6" alt="">
</div>
<div name="div7" id="div7" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic7" src="" id="pic7" alt="">
</div>
<div name="div8" id="div8" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic8" src="" id="pic8" alt="">
</div>
<div name="div9" id="div9" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic9" src="" id="pic9" alt="">
</div>
<div name="div10" id="div10" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic10" src="" id="pic10" alt="">
</div>




</BODY>
</HTML>


<script language="javascript">
Speed = 100;   // delay between movement
direction = 1;  // 1 for down (-1) for up
picheight = 20; //height of the pictures
picspacing = 5;  //amount of space between the pictures
div1.style.posTop = 0;
div2.style.posTop = div1.style.posTop + picheight +picspacing;
div3.style.posTop = div2.style.posTop + picheight +picspacing;
div4.style.posTop = div3.style.posTop + picheight +picspacing;
div5.style.posTop = div4.style.posTop + picheight +picspacing;
div6.style.posTop = div5.style.posTop + picheight +picspacing;
div7.style.posTop = div6.style.posTop + picheight +picspacing;
div8.style.posTop = div7.style.posTop + picheight +picspacing;
div9.style.posTop = div8.style.posTop + picheight +picspacing;
div10.style.posTop = div9.style.posTop + picheight +picspacing;


function rotate()
{
div1.style.posTop = div1.style.posTop + direction;  
div2.style.posTop = div2.style.posTop + direction;
div3.style.posTop = div3.style.posTop + direction;
div4.style.posTop = div4.style.posTop + direction;
div5.style.posTop = div5.style.posTop + direction;
div6.style.posTop = div6.style.posTop + direction;
div7.style.posTop = div7.style.posTop + direction;
div8.style.posTop = div8.style.posTop + direction;
div9.style.posTop = div9.style.posTop + direction;
div10.style.posTop = div10.style.posTop + direction;

if(div1.style.posTop < 1)
{
div1.style.posTop = ((picheight + picspacing) * 10);
}
if(div1.style.posTop > (((picheight + picspacing) * 10)+2))
{
div1.style.posTop = 1;
}

if(div2.style.posTop < 1)
{
div2.style.posTop = ((picheight + picspacing) * 10);
}
if(div2.style.posTop > (((picheight + picspacing) * 10)+2))
{
div2.style.posTop = 1;
}

if(div3.style.posTop < 1)
{
div3.style.posTop = ((picheight + picspacing) * 10);
}
if(div3.style.posTop > (((picheight + picspacing) * 10)+2))
{
div3.style.posTop = 1;
}

if(div4.style.posTop < 1)
{
div4.style.posTop = ((picheight + picspacing) * 10);
}
if(div4.style.posTop > (((picheight + picspacing) * 10)+2))
{
div4.style.posTop = 1;
}

if(div5.style.posTop < 1)
{
div5.style.posTop = ((picheight + picspacing) * 10);
}
if(div5.style.posTop > (((picheight + picspacing) * 10)+2))
{
div5.style.posTop = 1;
}

if(div6.style.posTop < 1)
{
div6.style.posTop = ((picheight + picspacing) * 10);
}
if(div6.style.posTop > (((picheight + picspacing) * 10)+2))
{
div6.style.posTop = 1;
}

if(div7.style.posTop < 1)
{
div7.style.posTop = ((picheight + picspacing) * 10);
}
if(div7.style.posTop > (((picheight + picspacing) * 10)+2))
{
div7.style.posTop = 1;
}

if(div8.style.posTop < 1)
{
div8.style.posTop = ((picheight + picspacing) * 10);
}
if(div8.style.posTop > (((picheight + picspacing) * 10)+2))
{
div8.style.posTop = 1;
}

if(div9.style.posTop < 1)
{
div9.style.posTop = ((picheight + picspacing) * 10);
}
if(div9.style.posTop > (((picheight + picspacing) * 10)+2))
{
div9.style.posTop = 1;
}

if(div10.style.posTop < 1)
{
div10.style.posTop = ((picheight + picspacing) * 10);
}
if(div10.style.posTop > (((picheight + picspacing) * 10)+2))
{
div10.style.posTop = 1;
}

setTimeout("rotate()",Speed)

}

rotate();
</script>

 

by: easynow111Posted on 2003-06-12 at 04:02:46ID: 8707517

All postings are very helpfull and I will award points tommorow if no-one can help me further.  The problem is I would like the pictures to continuously flow vertically, with each picture touching the one b4 and after.

  - jvokum - your script works fine but It takes one image at a time, whereas i need a continuous stream of images.

  - marshmeli - how would I adjust your script to use images + is it possible to autoscroll it

  - shofstetter - Exactly what i'm looking for, however all my images are 128px by undefined height, is there anyway of having the images join together, even tho they are different heights.

The purpose of this is for an email.  Does anyone know whether javascript is limited or works atall within emails.

Easynow

 

by: shofstetterPosted on 2003-06-12 at 06:04:06ID: 8708297

Yes I can modify it so ith will use he pictures hieght instead of a  variable.  I'll have it done ina little while:)

 

by: shofstetterPosted on 2003-06-12 at 06:39:28ID: 8708645

here give this version a try it checks for the pictures height it self:

<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>

<div name="div1" id="div1" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic1" src="" id="pic1" alt="">
</div>
<div name="div2" id="div2" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic2" src="" id="pic2" alt="">
</div>
<div name="div3" id="div3" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic3" src="" id="pic3" alt="">
</div>
<div name="div4" id="div4" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic4" src="" id="pic4" alt="">
</div>
<div name="div5" id="div5" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic5" src="" id="pic5" alt="">
</div>
<div name="div6" id="div6" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic6" src="" id="pic6" alt="">
</div>
<div name="div7" id="div7" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic7" src="" id="pic7" alt="">
</div>
<div name="div8" id="div8" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic8" src="" id="pic8" alt="">
</div>
<div name="div9" id="div9" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic9" src="" id="pic9" alt="">
</div>
<div name="div10" id="div10" style="position:absolute;height:100;width:100;left:0;top:0">
<img name="pic10" src="" id="pic10" alt="">
</div>




</BODY>
</HTML>


<script language="javascript">
var Speed = 100;   // delay between movement
var direction = -1;  // 1 for down (-1) for up
var picspacing = 0;  //amount of space between the pictures
div1.style.posTop = 0;
div2.style.posTop = div1.style.posTop + pic1.height +picspacing;
div3.style.posTop = div2.style.posTop + pic2.height +picspacing;
div4.style.posTop = div3.style.posTop + pic3.height +picspacing;
div5.style.posTop = div4.style.posTop + pic4.height +picspacing;
div6.style.posTop = div5.style.posTop + pic5.height +picspacing;
div7.style.posTop = div6.style.posTop + pic6.height +picspacing;
div8.style.posTop = div7.style.posTop + pic7.height +picspacing;
div9.style.posTop = div8.style.posTop + pic8.height +picspacing;
div10.style.posTop = div9.style.posTop + pic9.height +picspacing;

var CombinedHeight = (pic1.height + pic2.height + pic3.height + pic4.height + pic5.height + pic6.height + pic7.height + pic8.height + pic9.height + pic10.height + (10 *picspacing));
function rotate()
{
div1.style.posTop = div1.style.posTop + direction;  
div2.style.posTop = div2.style.posTop + direction;
div3.style.posTop = div3.style.posTop + direction;
div4.style.posTop = div4.style.posTop + direction;
div5.style.posTop = div5.style.posTop + direction;
div6.style.posTop = div6.style.posTop + direction;
div7.style.posTop = div7.style.posTop + direction;
div8.style.posTop = div8.style.posTop + direction;
div9.style.posTop = div9.style.posTop + direction;
div10.style.posTop = div10.style.posTop + direction;

if(div1.style.posTop < 1)
{
div1.style.posTop = CombinedHeight;
}
if(div1.style.posTop > CombinedHeight)
{
div1.style.posTop = 1;
}

if(div2.style.posTop < 1)
{
div2.style.posTop = CombinedHeight;
}
if(div2.style.posTop > CombinedHeight)
{
div2.style.posTop = 1;
}

if(div3.style.posTop < 1)
{
div3.style.posTop = CombinedHeight;
}
if(div3.style.posTop > CombinedHeight)
{
div3.style.posTop = 1;
}

if(div4.style.posTop < 1)
{
div4.style.posTop = CombinedHeight;
}
if(div4.style.posTop > CombinedHeight)
{
div4.style.posTop = 1;
}

if(div5.style.posTop < 1)
{
div5.style.posTop = CombinedHeight;
}
if(div5.style.posTop > CombinedHeight)
{
div5.style.posTop = 1;
}

if(div6.style.posTop < 1)
{
div6.style.posTop = CombinedHeight;
}
if(div6.style.posTop > CombinedHeight)
{
div6.style.posTop = 1;
}

if(div7.style.posTop < 1)
{
div7.style.posTop = CombinedHeight;
}
if(div7.style.posTop > CombinedHeight)
{
div7.style.posTop = 1;
}

if(div8.style.posTop < 1)
{
div8.style.posTop = CombinedHeight;
}
if(div8.style.posTop > CombinedHeight)
{
div8.style.posTop = 1;
}

if(div9.style.posTop < 1)
{
div9.style.posTop = CombinedHeight;
}
if(div9.style.posTop > CombinedHeight)
{
div9.style.posTop = 1;
}

if(div10.style.posTop < 1)
{
div10.style.posTop = CombinedHeight;
}
if(div10.style.posTop > CombinedHeight)
{
div10.style.posTop = 1;
}

setTimeout("rotate()",Speed)

}

rotate();
</script>

 

by: shofstetterPosted on 2003-06-12 at 06:46:23ID: 8708714

Note you will have to set the pictures height atribute when youadd them in:)<img src="bob.gif" height=111>
if you are using front page if you go to the pictures properties for each picture and check "specify height and set it to pixles.  It will fil thos fields in for you.

 

by: marshmeliPosted on 2003-06-12 at 07:00:14ID: 8708847

for the solution i suggested the pictures would go in a div layer look at the sample page i gave you, you will see a <div id=news clipping> you just make sure your pictures are in that layer and you are set...as for autoscroll, i am not sure, looking at the code

when the mouse goes over the scroll up image this code is executed: onMouseOver="scrollIt('Scroll Up',1); return true"

so take out the onMouseOver part, and just call this js function from the program:  "scrollIt('Scroll Up',1); return true" and you will prob want to make the scroll speed a bit slower so people can see the images, and maybe have an option that the user can turn auotscroll off....let me know if this helps...

 

by: easynow111Posted on 2003-06-13 at 01:33:29ID: 8715753

Thanks for all the help, all solutions proved very helpful, however i decided to use go with shoftsetter's answer.  Although marshmeli's worked also, thus the points split.  

Thanks again

Easynow

 

by: easynow111Posted on 2003-06-13 at 01:33:30ID: 8715755

Thanks for all the help, all solutions proved very helpful, however i decided to use go with shoftsetter's answer.  Although marshmeli's worked also, thus the points split.  

Thanks again

Easynow

 

by: shofstetterPosted on 2003-06-13 at 05:39:58ID: 8717224

actualy I have found an even easier way to do it

<marquee direction=up>
<img src="">
<br>
<img src="">
<br>
<img src="">
<br>
<img src="">
<br>
<img src="">
<br>
<img src="">
<br>
<img src="">
<br>
<img src="">
<br>
<img src="">
<br>
<img src="">
<br>
</marquee>

But it will not work with netscape:)  However it is less code and all you have to do is change the image src's

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...