adding an object in only certain frames

how do i add an object in a certian frame rather than having it in every frame ie frame 1 a cube no sphere frame 40 add a sphere

you can add an IPO to the layer channel of each object. thus, you can make it appear on different layers

ohh so animate in what order the frames appear and disappear

or do it the cheap and stupid/my way… put the object in front of the camera and (assuming you have a 25 frames rate per second or something close to it) when you want it to dissapear, put the object like behind the camera or away from its view. Make sure you add a keyframe right on the frame before you move it away from the camera view.

The way this works is that the object moves so fast that the viewer does not notice :Z