Speed is the trick, the faster you go the easier boxes are. Also never ever try to correct yourself on the box, if you got on at an angle and your heading for the edge just ride off the edge and try again... if you try to correct this you will hurt yourself. Lining up properly before getting on is key.
great advice that i learned the hard way. never "fight" to stay on the box. if you're going off then just stay flat, slide off and try again with a straight approach