The Magic Lantern
is a pre-cinematic invention that sometime had "animated" slides. It is a precursor to the projectors, and was very popular in Victorian times. You can read more about the history of the Magic Lantern here.
Another optical device that led to photography is the Camera Obscura