require 'phi'
require 'mci'

include Phi

frm = Form.new
btn = Button.new frm
btn.align = AL_BOTTOM
btn.caption = "next avi"
anim1 = Animate.new frm
anim1.file_name = 'ap.avi'
anim1.play

anim2 = Animate.new frm
anim2.left = anim1.width
anim2.common_avi = AVI_FIND_FILE
anim2.play

ak = [AVI_FIND_FOLDER, AVI_FIND_FILE, AVI_FIND_COMPUTER,
AVI_COPY_FILES, AVI_COPY_FILE, AVI_RECYCLE_FILE,
AVI_EMPTY_RECYCLE, AVI_DELETE_FILE]
ca = 2
btn.on_click = proc do
  anim2.stop
  anim2.common_avi = ak[(ca < ak.size - 1 ? ca += 1 : ca = 0)]
  anim2.play
end

frm.show

mainloop
