dynamic tickers

  • olm75
  • Proficient
  • Proficient
  • olm75
  • Posts: 294

Post 3+ Months Ago

i am am making a site, but i need a small size ticker to display upcoming events and i need this to come from a MySQL database, using PHP..my site is in html but i want the ticker i guess has to be in flash if it is scrolling automatically...or is there a simpler way to achieve this
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

why flash? there are scrollable divs in html
  • olm75
  • Proficient
  • Proficient
  • olm75
  • Posts: 294

Post 3+ Months Ago

can u show me how or send me to a tutorial were i can make a dynamic ticker which the information comes from a MySQL database...
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

using php, of course :D
dynamic ticker this is a asp version, but i`m sure it's simple to write it in php too.
Otherwise google
  • olm75
  • Proficient
  • Proficient
  • olm75
  • Posts: 294

Post 3+ Months Ago

ok have 1 in js but its not dynamic can u help me add the dynamic part in php:

Code: [ Select ]
<!--scroller ticker for social elements
function addScrollers() {
// code each scroller as follows:
// startScroll('id of scroller div','content of scroller');
startScroll('myscroller','<p><a href="http:\/\/socialelementsinc.com/event_profile.htm\">12-14-06 &nbsp;&nbsp; <b>DOWNTOWN AFTER DARK</b> has JavaScript tutorials, help pages, and lots of free scripts.<\/a><\/p><p><a href="http:\/\/socialelementsinc.com/event_listings.htm\">Ask Felgall<\/a> for help with anything to do with computers.</p><p><a href="http:\/\/about.com\/">About.com<\/a> - the ultimate guide directed information resource on the web.<\/p>');
startScroll('twoscroll','<p>Yet another scroller!</p>');
}

var speed=15; // scroll speed (bigger = faster)
var dR=false; // reverse direction

// Vertical Scroller Javascript
// copyright 24th September 2005, by Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the code below (as well as these
// comments) is used without any alteration
var step = 2; function objWidth(obj) {if(obj.offsetWidth) return obj.offsetWidth; if (obj.clip) return obj.clip.width; return 0;} function objHeight(obj) {if(obj.offsetHeight) return obj.offsetHeight; if (obj.clip) return obj.clip.height; return 0;} function scrF(i,sH,eH){var x=parseInt(i.top)+(dR? step: -step); if(dR && x>sH)x=-eH;else if(x<2-eH)x=sH;i.top = x+'px';} function startScroll(sN,txt){var scr=document.getElementById(sN); var sW = objWidth(scr)-6; var sH = objHeight(scr); scr.innerHTML = '<div id="'+sN+'in" style="position:absolute; left:3px; width:'+sW+';">'+txt+'<\/div>'; var sTxt=document.getElementById(sN+'in'); var eH=objHeight(sTxt); sTxt.style.top=(dR? -eH : sH)+'px'; sTxt.style.clip='rect(0,'+sW+'px,'+eH+'px,0)'; setInterval(function() {scrF(sTxt.style,sH,eH);},1000/speed);}
window.onload = addScrollers;
  1. <!--scroller ticker for social elements
  2. function addScrollers() {
  3. // code each scroller as follows:
  4. // startScroll('id of scroller div','content of scroller');
  5. startScroll('myscroller','<p><a href="http:\/\/socialelementsinc.com/event_profile.htm\">12-14-06 &nbsp;&nbsp; <b>DOWNTOWN AFTER DARK</b> has JavaScript tutorials, help pages, and lots of free scripts.<\/a><\/p><p><a href="http:\/\/socialelementsinc.com/event_listings.htm\">Ask Felgall<\/a> for help with anything to do with computers.</p><p><a href="http:\/\/about.com\/">About.com<\/a> - the ultimate guide directed information resource on the web.<\/p>');
  6. startScroll('twoscroll','<p>Yet another scroller!</p>');
  7. }
  8. var speed=15; // scroll speed (bigger = faster)
  9. var dR=false; // reverse direction
  10. // Vertical Scroller Javascript
  11. // copyright 24th September 2005, by Stephen Chapman
  12. // permission to use this Javascript on your web page is granted
  13. // provided that all of the code below (as well as these
  14. // comments) is used without any alteration
  15. var step = 2; function objWidth(obj) {if(obj.offsetWidth) return obj.offsetWidth; if (obj.clip) return obj.clip.width; return 0;} function objHeight(obj) {if(obj.offsetHeight) return obj.offsetHeight; if (obj.clip) return obj.clip.height; return 0;} function scrF(i,sH,eH){var x=parseInt(i.top)+(dR? step: -step); if(dR && x>sH)x=-eH;else if(x<2-eH)x=sH;i.top = x+'px';} function startScroll(sN,txt){var scr=document.getElementById(sN); var sW = objWidth(scr)-6; var sH = objHeight(scr); scr.innerHTML = '<div id="'+sN+'in" style="position:absolute; left:3px; width:'+sW+';">'+txt+'<\/div>'; var sTxt=document.getElementById(sN+'in'); var eH=objHeight(sTxt); sTxt.style.top=(dR? -eH : sH)+'px'; sTxt.style.clip='rect(0,'+sW+'px,'+eH+'px,0)'; setInterval(function() {scrF(sTxt.style,sH,eH);},1000/speed);}
  16. window.onload = addScrollers;


of course i didnt write this i found this little snippet....
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

then try this, using iframe:
iframe ticker ... seems pretty easy and uses an external source which can be dynamically populated from php.
  • olm75
  • Proficient
  • Proficient
  • olm75
  • Posts: 294

Post 3+ Months Ago

thanks it worked and i got other tips great site
http://www.socialelementsinc.com/index.htm
  • bozboz
  • Novice
  • Novice
  • bozboz
  • Posts: 31
  • Loc: Brighton

Post 3+ Months Ago

I made a dynamic ticker using php / flash recently check http://www.thevoyagerschool.com/index.php

I find the custom font ability gives it a better feel than a java / html one

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 12 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.