For WME related articles and tutorials visit WME Resource Center.
while (actor.X > startX && actor.X < endX){ code to execute}