Class: Presentation::MyVideo
- Inherits:
-
Object
- Object
- Presentation::MyVideo
- Defined in:
- lib/soby/presentation.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#matrix ⇒ Object
readonly
Returns the value of attribute matrix.
-
#slide ⇒ Object
readonly
Returns the value of attribute slide.
-
#video ⇒ Object
Returns the value of attribute video.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(path, slide, matrix, width, height) ⇒ MyVideo
constructor
A new instance of MyVideo.
- #play ⇒ Object
Constructor Details
#initialize(path, slide, matrix, width, height) ⇒ MyVideo
Returns a new instance of MyVideo.
308 309 310 311 312 313 314 |
# File 'lib/soby/presentation.rb', line 308 def initialize(path, , matrix, width, height) @path = path @width = width @height = height @matrix = matrix @slide = end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
305 306 307 |
# File 'lib/soby/presentation.rb', line 305 def height @height end |
#matrix ⇒ Object (readonly)
Returns the value of attribute matrix.
305 306 307 |
# File 'lib/soby/presentation.rb', line 305 def matrix @matrix end |
#slide ⇒ Object (readonly)
Returns the value of attribute slide.
305 306 307 |
# File 'lib/soby/presentation.rb', line 305 def @slide end |
#video ⇒ Object
Returns the value of attribute video.
306 307 308 |
# File 'lib/soby/presentation.rb', line 306 def video @video end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
305 306 307 |
# File 'lib/soby/presentation.rb', line 305 def width @width end |
Instance Method Details
#play ⇒ Object
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/soby/presentation.rb', line 316 def play if @video == nil absolute_path = $app.sketchPath "" << @path puts ("loading the video : " + absolute_path) vid = Movie.new($app, absolute_path) # vid = Movie.new($app, @path) puts "Loaded " puts vid, vid.width, vid.height vid.play @video = vid true else false end end |