Create  Edit  Diff  Phillro Industries  Index  Search  Changes  History  Source  RSS  Note  wikifarm  Login

animtest.rb

Sponsor : Cara Menaikan Posisi Website di Google | Cara Mudah Google

$(Apollo)/sample/animtest.rb

ap-dev:1192 TAnimate 【Re: Apollo で mpeg を扱うには?】 T Sakurai

Phi::Animateクラスのサンプルです。絵が動きます。

1.png

短いプログラムなので、全部あげておきます。

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

External Tips Mudah

Last modified:2014/03/08 01:19:46
Keyword(s):
References:[Phi-CommonAVI] [Phi::Animate] [雑談]