added setTransitionDuration method.
fixed errors.