Sha256: 730ede0f7c94341f667a2a7f58bd4b4ccabfd9be484b86211888a984832d978c
Contents?: true
Size: 634 Bytes
Versions: 10
Compression:
Stored size: 634 Bytes
Contents
# # Scratch # by Andres Colubri. # # Move the cursor horizontally across the screen to set # the position in the movie file. # load_library :video include_package 'processing.video' attr_reader :mov def setup size(640, 360) background(0) @mov = Movie.new(self, "transit.mov") # Pausing the video at the first frame. mov.play mov.jump 0 mov.pause end def draw begin mov.read # A new time position is calculated using the current mouse location: t = mov.duration * map(mouse_x, 0, width, 0, 1.0) mov.play mov.jump(t) mov.pause end unless !mov.available? image(mov, 0, 0) end
Version data entries
10 entries across 10 versions & 1 rubygems