 
     /** Advances the playhead by the give number of seconds. From IAnimatable. */
     public function advanceTime (dt :Number) :void {
-        if (dt < 0) throw new Error("Invalid time [dt=" + dt + "]");
-        if (_skipAdvanceTime) { _skipAdvanceTime = false; return; }
-        if (_state == STOPPED) return;
+        if (dt < 0) {
+            throw new Error("Invalid time [dt=" + dt + "]");
+        }
+
+        if (_skipAdvanceTime) {
+            _skipAdvanceTime = false;
+            return;
+        }
+
+        if (_state == STOPPED) {
+            return;
+        }
 
         if (_state == PLAYING && _numFrames > 1) {
             _playTime += dt;
             var actualPlaytime :Number = _playTime;
-            if (_playTime >= _duration) _playTime %= _duration;
+            if (_playTime >= _duration) {
+                _playTime %= _duration;
+            }
 
             // If _playTime is very close to _duration, rounding error can cause us to
             // land on lastFrame + 1. Protect against that.
             var newFrame :int = int(_playTime * _frameRate);
-            if (newFrame < 0) newFrame = 0;
-            if (newFrame >= _numFrames) newFrame = _numFrames - 1;
+            if (newFrame < 0) {
+                newFrame = 0;
+            } else if (newFrame >= _numFrames) {
+                newFrame = _numFrames - 1;
+            }
 
             // If the update crosses or goes to the stopFrame:
             // go to the stopFrame, stop the movie, clear the stopFrame

        } else {
            startFrame = (oldFrame + 1 < _numFrames ? oldFrame + 1 : 0);
            frameCount = (_frame - oldFrame);
            if (wrapped) frameCount += _numFrames;
        }

        // Fire signals. Stop if pendingFrame is updated, which indicates that the client

     */
    protected function updateFrame (newFrame :int, dt :Number) :void {
        if (newFrame < 0 || newFrame >= _numFrames) {
            throw new Error("Invalid frame [frame=" + newFrame + ", validRange=0-" + (_numFrames - 1) + "]");
        }

        if (_isUpdatingFrame) {
            _pendingFrame = newFrame;
            return;
        }

        _pendingFrame = NO_FRAME;
        _isUpdatingFrame = true;

        const isGoTo :Boolean = (dt <= 0);
        const wrapped :Boolean = (dt >= _duration) || (newFrame < _frame);
