Results 1 to 5 of 5

Thread: iFrame scroller

  1. #1
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iFrame scroller

    1) Script Title: iFrame Scroller

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...e-scroller.htm

    3) Describe problem: So I'm pretty new at this, I have the frame in my page but I don't know where to put the external.htm file so that it will read it. I see that there's a place to specify the path to the external page but I'm not exactly sure what to put there. If someone had advice or could show me an example that would be awesome.

  2. #2
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Nevermind, I figured it out. Also though, is there a way to make the scroller scroll slow then 1? I also wanted to know if there was a way to make the scroller either sit on the original text for a second before it starts scrolling each time or somehow make it start scrolling back in from the top like a wheel or something. Any thoughts?

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    You can further slow down the scrolling of the IFRAME, apart from setting "scrollspeed" to 1, by changing the 40 value below in "external.htm" to a larger number:

    Code:
    setTimeout("scrollDiv()",40)
    Change it to 80, for example.

    Regarding setting a initial delay before the scroller starts scrolling, this is actually supported by default inside "external.htm":

    Code:
    //Specify intial delay before scroller starts scrolling (in miliseconds):
    var initialdelay=500
    Change 500 to 1000 for 1 second.

  4. #4
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Cool, I got it to slow down a bit more but for the delay, I was hoping there would be the same delay every time it went back to the head. As it stands there is only a delay before the first rotation then it goes continuously.

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I assume you mean the initialdelay setting. Sure, to get it to apply whenever the scroller starts scrolling from the top again, try changing the below lines in external.htm:

    Code:
    if (parseInt(dataobj.style.top)<thelength*(-1))
    dataobj.style.top="5px"
    setTimeout("scrollDiv()",40)
    to:

    Code:
    if (parseInt(dataobj.style.top)<thelength*(-1)){
    dataobj.style.top="5px"
    setTimeout("scrollDiv()", initialdelay)
    }
    else
    setTimeout("scrollDiv()",40)
    You'll also want to change the below line:

    Code:
    setTimeout("getdataheight()", initialdelay)
    to just:

    Code:
    setTimeout("getdataheight()", 20)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •