[plt-scheme] embedding movies in slideshow presentations?
> You can also create a new frame% and do anything you like with it, or
> launch an external program using `system'. The simplest way to trigger
> the new frame or external program is to create a clickable slide
> element with `clickback'.
Thanks! I've figured out how (in Windows) to launch an external MysterX
browser with an ActiveX Media Player (source given below for posterity).
The ideal would be if I could embed this directly within the slide
itself. Is it possible to embed a frame% or an mx-browser%?
Otherwise this will do fine.
Thanks again,
Dave
;; --
(require (lib "mysterx.ss" "mysterx"))
(require (lib "class.ss"))
;; This is hard-coded to expect the standard Windows XP window styles.
;; Which is fine for my purposes.
(define (play-video file title width height)
(let ([titlebar-height 30]
[toolbar-height 64]
[frame-thickness 4]
[horizontal-padding 10]
[vertical-padding 15])
(let* ([browser (make-object mx-browser%
title
;; COM object width:
(+ frame-thickness
horizontal-padding
width
horizontal-padding
frame-thickness)
;; COM object height:
(+ titlebar-height
vertical-padding
height
toolbar-height
vertical-padding
frame-thickness))]
[document (send browser current-document)]
[player (send document insert-object-from-coclass
"Windows Media Player"
width (+ height toolbar-height))]
[movie (com-invoke player "newMedia" file)])
(com-set-property! player "currentMedia" movie)
browser)))
;; --