Skip to content

Commit

Permalink
correction to time output on clock for certain times
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-bateman committed Oct 5, 2013
1 parent 827f122 commit dd25731
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/Intermediate_SpriteSheetAnimation.as
Original file line number Diff line number Diff line change
Expand Up @@ -420,20 +420,20 @@ package {
private function updateClock():void
{
var date:Date = new Date();

if(_lastHour != date.hours+1){
_lastHour = date.hours+1;
_hoursAnimator.gotoAndStop(_lastHour);
if(_lastHour != date.hours){
_lastHour = date.hours;
_hoursAnimator.gotoAndStop(_lastHour + 1);
}

if(_lastMinute != date.minutes+1){
_lastMinute = date.minutes+1;
_minutesAnimator.gotoAndStop(_lastMinute);
if(_lastMinute != date.minutes){
_lastMinute = date.minutes;
_minutesAnimator.gotoAndStop(_lastMinute + 1);
}

if(_lastSecond != date.seconds+1){
_lastSecond = date.seconds+1;
_secondsAnimator.gotoAndStop(_lastSecond);
if(_lastSecond != date.seconds){
_lastSecond = date.seconds;
_secondsAnimator.gotoAndStop(_lastSecond + 1);
_delimiterAnimator.gotoAndPlay(1);
}
}
Expand Down

0 comments on commit dd25731

Please sign in to comment.