Code example for Movie

Methods: draw, duration, setTime

0
	        long now = android.os.SystemClock.uptimeMillis();
	        if (mMovieStart == 0) {   // first time
	            mMovieStart = now;
	        } 
	        if (mMovie != null) {
	            int dur = mMovie.duration();
	            if (dur == 0) {
	                dur = 1000;
	            } 
	            int relTime = (int)((now - mMovieStart) % dur);
	            mMovie.setTime(relTime);
	            mMovie.draw(canvas, 0, 0);
	            invalidate();
	        } 
    	} else { 
    		canvas.drawBitmap(mBitmap, 0, 0, null);
    	} 
    } 
}