Results 1 to 4 of 4

Thread: i ticker

  1. #1
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default i ticker

    is there an easier way to make an i ticker than the script in DD? maybe an i-frame with a random page src, that rotates every 5 seconds to another random page? Have any ideas?
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  2. #2
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Hi Ian

    What's wrong with the one on DD??
    it would seem to do what you require!!
    Last edited by simonf; 07-25-2005 at 02:36 PM. Reason: spelling
    Very Best Rgds, Simonf :cool:
    __________________________________
    My Site | E-Mail Me

  3. #3
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    look at how much code there is:
    Code:
    <style type="text/css">
    
    #memoryticker{
    background-color: lightyellow;
    width: 450px;
    font: bold 12px Verdana;
    /*Tip: add in height attribute here for multiple line scroller*/
    border: 1px solid black;
    padding: 3px;
    /*Change 0.7 below to a different number if desired (0.7=0.7 seconds)*/
    /*Remove below line to remove transitional effect in IE. Below line should always appear last within this CSS*/
    filter: progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)
    }
    
    </style>
    Code:
    <script type="text/javascript">
    
    /***********************************************
    * Memory Ticker script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    //configure tickercontents[] to set the messges you wish be displayed (HTML codes accepted)
    //Backslash any apostrophes within your text (ie: I\'m the king of the world!)
    var tickercontents=new Array()
    tickercontents[0]='1) <a href="http://www.javascriptkit.com">JavaScriptKit.com</a>- JavaScript tutorials and scripts.</a>'
    tickercontents[1]='2) <a href="http://www.codingforums.com">Coding Forums</a>- Web coding and development forums.</a>'
    tickercontents[2]='3) <a href="http://www.dynamicdrive.com">DynamicDrive.com</a>- Award winning, original DHTML scripts.</a>'
    tickercontents[3]='4) <a href="http://www.freewarejava.com">FreewareJava</a>- Free Java applets, tutorials, and resources.</a>'
    
    var persistlastviewedmsg=1 //should messages' order persist after users navigate away (1=yes, 0=no)?
    var persistmsgbehavior="onload" //set to "onload" or "onclick".
    
    //configure the below variable to determine the delay between ticking of messages (in miliseconds):
    var tickdelay=3000
    
    ////Do not edit pass this line////////////////
    
    var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="savelastmsg()" ' : ''
    var currentmessage=0
    
    function changetickercontent(){
    if (crosstick.filters && crosstick.filters.length>0)
    crosstick.filters[0].Apply()
    crosstick.innerHTML=tickercontents[currentmessage]
    if (crosstick.filters && crosstick.filters.length>0)
    crosstick.filters[0].Play()
    currentmessage=(currentmessage==tickercontents.length-1)? currentmessage=0 : currentmessage+1
    var filterduration=(crosstick.filters&&crosstick.filters.length>0)? crosstick.filters[0].duration*1000 : 0
    setTimeout("changetickercontent()",tickdelay+filterduration)
    }
    
    function beginticker(){
    if (persistlastviewedmsg && get_cookie("lastmsgnum")!="")
    revivelastmsg()
    crosstick=document.getElementById? document.getElementById("memoryticker") : document.all.memoryticker
    changetickercontent()
    }
    
    function get_cookie(Name) {
    var search = Name + "="
    var returnvalue = ""
    if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) {
    offset += search.length
    end = document.cookie.indexOf(";", offset)
    if (end == -1)
    end = document.cookie.length;
    returnvalue=unescape(document.cookie.substring(offset, end))
    }
    }
    return returnvalue;
    }
    
    function savelastmsg(){
    document.cookie="lastmsgnum="+currentmessage
    }
    
    function revivelastmsg(){
    currentmessage=parseInt(get_cookie("lastmsgnum"))
    currentmessage=(currentmessage==0)? tickercontents.length-1 : currentmessage-1
    }
    
    if (persistlastviewedmsg && persistmsgbehavior=="onload")
    window.onunload=savelastmsg
    
    if (document.all||document.getElementById)
    document.write('<div id="memoryticker" '+divonclick+'></div>')
    if (window.addEventListener)
    window.addEventListener("load", beginticker, false)
    else if (window.attachEvent)
    window.attachEvent("onload", beginticker)
    else if (document.all || document.getElementById)
    window.onload=beginticker
    
    </script>
    that's alot, and it would make your page difficult to easily look over (the script version of course)
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  4. #4
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    then place the code in a seperate htm page and call the text via a frame
    Very Best Rgds, Simonf :cool:
    __________________________________
    My Site | E-Mail Me

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
  •