If X-ray flashes (XRFs) and X-ray rich Gamma-ray Bursts
(XRRGs) have the same origin as the Gamma-ray bursts (GRBs) but
are viewed off-center from structured jets, their early afterglows
may differ from those of GRBs, and when the ultra-relativistic
outflow interacts with the surrounding medium, there are two
shocks formed, a forward shock (FS), and a reverse shock (RS). We
calculate numerically the early afterglow powered by uniform jets,
Gaussian jets and power-law jets in the forward-reverse shock
scenario. A set of differential equations govern the dynamical
evolution. The synchrotron self-Compton effect has been taken into
account in the calculation. In the uniform jets, the very early
afterglows of XRRGs and XRFs are significantly lower than the GRBs
and the observed peak times of RS emission are later in the
interstellar medium environment. The RS components in XRRGs and
XRFs are difficult to detect, but in the stellar wind
environment, the reduction of the very early flux and the delay of
the RS peak time are not so remarkable. In nonuniform jets
(Gaussian and power-law jets), where there are emission materials
on the line of sight, the very early light curve resembles
equivalent isotropic ejecta in general although the RS flux decay
index shows notable deviations if the RS is relativistic (in
stellar wind).