def set_current(current)
      if length.zero?
        self.scene = nil
        return
      # Don't bother looking for current image
      elsif scene.nil? || scene >= length
        self.scene = length - 1
        return
      elsif !current.nil?
        # Find last instance of "current" in the list.
        # If "current" isn't in the list, set current to last image.
        self.scene = length - 1
        each_with_index do |f, i|
          self.scene = i if f.__id__ == current
        end
        return
      end
      self.scene = length - 1
    end
def set_current(current)
      if length.zero?
        self.scene = nil
        return
      # Don't bother looking for current image
      elsif scene.nil? || scene >= length
        self.scene = length - 1
        return
      elsif !current.nil?
        # Find last instance of "current" in the list.
        # If "current" isn't in the list, set current to last image.
        self.scene = length - 1
        each_with_index do |f, i|
          self.scene = i if f.__id__ == current
        end
        return
      end
      self.scene = length - 1
    end
Find old current image, update scene number
 current is the id of the old current image.