Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 27 lines (21 sloc) 0.583 kb
c8c48e5 @ashbb Implemented show, hide and toggle method. Potacho in Green Shoes works n...
authored
1 # This is a tiny flip book (aka Para-Para Manga in Japanese)
2 # original is http://www.paraman.net/play/preview/1258
3 #
a641317 @ashbb Revised all samples for the gem executable command `gshoes`.
authored
4 require 'green_shoes'
c8c48e5 @ashbb Implemented show, hide and toggle method. Potacho in Green Shoes works n...
authored
5
6 Shoes.app title: 'potacho', width: 175, height: 160 do
7 background tan
8
9 @imgs = []
a641317 @ashbb Revised all samples for the gem executable command `gshoes`.
authored
10 1.upto 59 do |i|
11 @imgs << image(File.join(DIR, "../samples/potato_chopping/1258_s#{"%03d" % i}.gif")).hide.move(10, 10)
c8c48e5 @ashbb Implemented show, hide and toggle method. Potacho in Green Shoes works n...
authored
12 end
13
14 @imgs.first.show
15
16 def potacho
a641317 @ashbb Revised all samples for the gem executable command `gshoes`.
authored
17 @imgs[58].hide
c8c48e5 @ashbb Implemented show, hide and toggle method. Potacho in Green Shoes works n...
authored
18 a = animate 12 do |i|
19 @imgs[i].show
20 @imgs[i-1].hide if i > 0
a641317 @ashbb Revised all samples for the gem executable command `gshoes`.
authored
21 a.stop if i > 57
c8c48e5 @ashbb Implemented show, hide and toggle method. Potacho in Green Shoes works n...
authored
22 end
23 end
24
25 button(' start '){potacho}.move 10, 130
26 end
Something went wrong with that request. Please try again.