Sha256: 392f5b07afafcb16056a44658cb95630c4d3412483a32ff756fe4f6eaef01c36

Contents?: true

Size: 688 Bytes

Versions: 1

Compression:

Stored size: 688 Bytes

Contents

require 'purple_shoes'

Shoes.app width: 300, height: 100, title: 'Teeny-weeny Audio player' do
  space = ' '
  background gold..cyan, angle: 30
  song = para 'song.ogg', stroke: firebrick, left: 0, top: 70
  file = 'http://www.rin-shun.com/shoes/song.ogg'
  v = video file

  para link('select'){
    unless v.playing?
      f = ask_open_file
      file = f if f
      v = video file
      song.text = file
    end
  }, space, link('play'){v.play}, space, link('start'){v.start}, space, link('stop'){v.stop}
  
  img = image File.join(DIR, '../samples/loogink.png')
  n = 0
  animate 5 do
    img.move (n+=1) % 300 , 40 - rand(10) if file && v.playing?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
purple_shoes-0.7.166 samples/sample58.rb