Skip to content

Instantly share code, notes, and snippets.

@weyert
Created July 22, 2011 16:24
Show Gist options
  • Select an option

  • Save weyert/1099785 to your computer and use it in GitHub Desktop.

Select an option

Save weyert/1099785 to your computer and use it in GitHub Desktop.
Animations
private function onViewsUpdate():void
{
for each ( var item: AnimatedNumberView in _numberViews )
{
if ( item.animating )
{
item.currentValue++;
if ( item.currentValue > 9 ) {
item.currentValue = 0;
}
}
if ( item.animating && item.isSelecting )
{
if ( item.currentValue == item.value )
{
var idx: Number = _numberViews.indexOf(item);
_numberViews.splice( idx, 1 );
item.animating = false;
item.removeBlurFilter();
item.updateView();
selectNextItem();
continue;
}
}
item.updateView();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment