home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Archived / Internet / jvscript116beta / JvScript / !JvScript / Resources / Scripts / Scrollers / 1 next >
Encoding:
Text File  |  1999-09-22  |  707 b   |  35 lines

  1. newformat
  2. _title:Quick Status Bar Scroll
  3. _description: A Quick scrolling message across the status bar
  4. _author:Andrew Pullan
  5. _contact:a.j.pullan@zetnet.co.uk
  6. _message:Message to scroll
  7. _insert-in:inhead
  8. <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
  9. <!--
  10. var spaces = " ";
  11. var msg  = "¤message_object$(1)¤";
  12.  
  13. var max = msg.length;
  14. if (max > 40)
  15.  max = 40;
  16.  
  17. while (spaces.length < max) {
  18.  spaces += "  ";
  19. }
  20.  
  21. var msg2 = spaces + msg + spaces;
  22.  
  23. function scrollstatus(seed) {
  24. window.status=msg2.substring(seed, seed + max);
  25. seed += 1;
  26. if (seed > msg2.length - max)
  27.  seed=0;
  28. timer1=window.setTimeout("scrollstatus("+seed+")",75);
  29. }
  30.  
  31. window.setTimeout('scrollstatus(0)',500);
  32. // -->
  33. </SCRIPT>
  34. _end-insert:
  35.