Updates the currently running animation.

        This method should be called in every frame where you want an animation to run.
        Its job is to figure out if it is time to move onto the next image in the animation.
508921
def update(self):
        
        returnValue = False  # typical return value
        if self.state != PygAnimation.PLAYING:
            return returnValue

        # The job here is to figure out the index of the image to show
        # and the matching elapsed time threshold for the current image
        self.elapsed = (time.time() - self.playingStartTime)

        if self.elapsed > self.elapsedStopTime:  # anim finished
            if self.loop:  # restart the animation
                self.playingStartTime = time.time()
                self.nextElapsedThreshold = self.endTimesList[0]
            else:  # not looping
                self.nIterationsLeft = self.nIterationsLeft - 1
                if self.nIterationsLeft == 0:  # done
                    self.state = PygAnimation.STOPPED
                    if self.callBack != None:  # if there is a callBack
                        self.callBack(self.nickname)  # do it
                    returnValue = True  # animation has ended
                else:  # another iteration - start over again
                    self.playingStartTime = time.time()
                    self.nextElapsedThreshold = self.endTimesList[0]
            self.index = 0

        elif self.elapsed > self.nextElapsedThreshold:
            # Time to move on to next picture
            self.index = self.index + 1
            self.nextElapsedThreshold = self.endTimesList[self.index]

        return returnValue
496433
def animation(self, animation):
        
        self._animation = animation
        self._text = self._get_text(self._text['original'])
158592
public void restart() {
		if (frames.size() == 0) {
			return;
		}
		stopped = false;
		currentFrame = 0;
		nextChange = (int) (((Frame) frames.get(0)).duration / speed);
		firstUpdate = true;
		lastUpdate = 0;
	}
1047487
private void resetAnimation(){		
		mLastUpdateTime = SystemClock.uptimeMillis();
		mLastProgressStateTime = mLastUpdateTime;
		mStartAngle = mInitialAngle;
		mStrokeColorIndex = 0;
		mSweepAngle = mReverse ? -mMinSweepAngle : mMinSweepAngle;
	}
261961
public void postUpdate()
    {
        if (current != null)
        {
            final Class<? extends State> next = current.checkTransitions(last);
            if (next != null)
            {
                changeState(next);
            }
        }
    }
232334
public synchronized void nextFrame() {
        currentFrame++;
        if(currentFrame >= frames.size()) {
            currentFrame = 0;
        }
        super.setLines(frames.get(currentFrame));
        invalidate();
    }
379114
def increment_frame(self):
        """"""
        if self.current_frame < len(self.images):
            self.current_frame += 1

            if self.current_frame >= len(self.images):
                # Wrap back to the beginning of the animation if should_repeat is true.
                if self.should_repeat:
                    self.current_frame = 0
                else:
                    # Clamp the current frame to the number of images we have in our list
                    self.current_frame = len(self.images) - 1

            # Set the image that is currently displaying.
            if self.current_frame < len(self.images):
                self.image = self.images[self.current_frame]
                self.image.coords = self.coords
217034
protected final void update() {
		BufferedImage image=getImageViewer()==null ? null : getImageViewer().getImage();
		if (image==null || model.isInvalid() || model.getX()>=image.getWidth() || model.getY()>=image.getHeight())
			updateLabelNoData();
		else
			updateLabel(image, model.getX(), model.getY(), statusBar.getWidth()-statusBarInsets.left-statusBarInsets.right);
	}
1323859
def _updateFrame(self):
        
        for col, mov in self._movies.items():
            self.setIcon(col, QtGui.QIcon(mov.currentPixmap()))
26205
def update(self):
        
        assert threading.current_thread() == threading.main_thread()
        for axis, line, interface in self.interfaces:
            line.set_xdata(interface.xdata)
            line.set_ydata(interface.ydata)
            axis.set_xlim(0, interface.width or 1, emit=False)
            axis.set_ylim(0, interface.height or 1, emit=False)
        self.figure.canvas.draw()
994335
public void update() {
        final long time = System.currentTimeMillis();
        elapsedTime += time - lastUpdateTime;
        lastUpdateTime = time;
        frameCount++;
        if (elapsedTime >= 1000) {
            tps = frameCount;
            frameCount = 0;
            elapsedTime = 0;
        }
    }
284139
public function run()
    {
        $files     = $this->artDir($this->art);
        $animation = [];

        foreach ($files as $file) {
            $animation[] = $this->parse($file);
        }

        $this->animate($animation);
    }
67156
def _finishAnimation(self):
        
        self.setCurrentIndex(self._nextIndex)
        self.widget(self._lastIndex).hide()
        self.widget(self._lastIndex).move(self._lastPoint)
        self._active = False
        
        if not self.signalsBlocked():
            self.animationFinished.emit()
1356191
private void updateImage() {
		if (!over) {
			currentImage = normalImage;
			currentColor = normalColor;
			state = NORMAL;
			mouseUp = false;
		} else {
			if (mouseDown) {
				if ((state != MOUSE_DOWN) && (mouseUp)) {
					if (mouseDownSound != null) {
						mouseDownSound.play();
					}
					currentImage = mouseDownImage;
					currentColor = mouseDownColor;
					state = MOUSE_DOWN;
					
					notifyListeners();
					mouseUp = false;
				}
				
				return;
			} else {
				mouseUp = true;
				if (state != MOUSE_OVER) {
					if (mouseOverSound != null) {
						mouseOverSound.play();
					}
					currentImage = mouseOverImage;
					currentColor = mouseOverColor;
					state = MOUSE_OVER;
				}
			}
		}

		mouseDown = false;
		state = NORMAL;
	}
560715
function(){
			var image = document.createElement("img");
			image.id = this._prefix+this._id;
			image.src = Commands.NO_IMAGE;
			image.className = "progressPane_running";
			this._anchor.appendChild(image);
		}
1150061
function refresh() {
    if( active ) {
      requestAnimFrame( refresh );
      
      for( var i = 0, len = lists.length; i < len; i++ ) {
        lists[i].update();
      }
    }
  }
1371967
function (init) {
		var animation = this.options.animation;
		
		if (!init) { // run the animation
			each(this.points, function (point) {
				var graphic = point.graphic,
					shapeArgs = point.shapeArgs;

				if (graphic && shapeArgs) {
					// start values
					graphic.attr('r', 1);

					// animate
					graphic.animate({
						r: shapeArgs.r
					}, animation);
				}
			});

			// delete this function to allow it only once
			this.animate = null;
		}
	}