i cant think of the best way to do this right now.
it depends on your content and what is foreground and background.
can you post a diagram here of what you images?
you can use movies with alpha channels if you use the animation codec in millions of colours+ mode.