Code to play images and sound