开发者

Improving counter with animation AS3

开发者 https://www.devze.com 2022-12-19 20:49 出处:网络
With what I’ve got now, which which is“dynamic text” counting, how can I improve it with animation? I want “scrolling” like and odometer, and also want “ticking” like an LED.

With what I’ve got now, which which is “dynamic text” counting, how can I improve it with animation? I want “scrolling” like and odometer, and also want “ticking” like an LED.

Parts I’m having problems with

a. have the counter push array with different images “half understand this”

b. need animation to be a object I can change o开发者_开发技巧ut “LED ticker, odometer scroller”

c. implementation "I'm confused"

alt text http://www.ashcraftband.com/myspace/videodnd/examp.jpg

//counter
var timer:Timer = new Timer(10);  
var count:int = 0; //start at -1 if you want the first decimal to be 0  
var fcount:int = 0; 
timer.addEventListener(TimerEvent.TIMER, incrementCounter);  
timer.start();  

function incrementCounter(event:TimerEvent) {  
  count++;  
  fcount=int(count*count/1000);//starts out slow... then speeds up 
  mytext.text = formatCount(fcount);
}

function formatCount(i:int):String { 
     var fraction:int = i % 100; 
     var whole:int = i / 100;  

    return ("0000000" + whole).substr(-7, 7) + "." + (fraction < 10 ? "0" + fraction : fraction); 
} 

"Thanks for the help"

alt text http://www.ashcraftband.com/myspace/videodnd/board2.jpg


Is this what you are after?

http://shaneberry.net/numbers/

0

精彩评论

暂无评论...
验证码 换一张
取 消