1 Reply Latest reply on Aug 20, 2009 1:10 PM by kglad

    Odometer Style Banner


      I am going through the thought process of coming up with a banner that will display the amount of parts in our inventory and displaying how it is growing every second.


      Basically a 6 spots in the banner. 20,000 (I am counting the , as a spot though it will not move)


      The numbers roll up gradually from 20,000 to 20,999 then back to 20,000.


      the first # scrolling by 0-9 the fastest, which clicks over the second number upon exit of 9 in the first location, etc etc.


      Other then doing framed movies that show a number list scrolling by 0-9 in every slot and having it skip to a movie frame for each exit of #9 going on for a very long time, is there something shorter that can be done with actionscript?


      The aforementioned fashion of doing it is not smooth and really doesn't look like a scrolling odometer to me. (personal opinion)


      Can some wizard of actionscript help! I can't find anything in a couple actionscript books that go over this kind of thing.

        • 1. Re: Odometer Style Banner
          kglad Adobe Community Professional & MVP

          you'll need a movieclip with the numbers 0,1,2,...,9,0 arranged vertically.  use a mask to display just one digit plus space above and below the numeral.  you can add an alpha gradient over the top of the display so the numbers appear to be on a spool like a mechanical odometer.  you'll then update the y (or _y) property of your movieclip.  when last 0 is displayed adjust the y (or _y) property so your numerals look like they're on an infinite or repeating spool.  add a few more rows and some logic to adjust the column to the left after the display to the right changes from 9 to 0 and you're done with the counting-up odometer.