Transition for photos?

I am trying to learn how to do transitions between photos. I cannot for the life of me figure out how to have a transition work when the photos are not selected in the same order. For instance:

  • Photo 1 is visible
  • User clicks on icon for Photo 4
  • Photo 4 loads with some transition on top of Photo 1

An example is here: http://www.templatemonster.com/flash-templates/10674.html

I am using Flash 8 Pro. Any ideas?