(module fr-test0 "../slideshow.ss"
(set-dc-for-text-size)
(define (color-string)
(let* ([slide-time (current-slide/time)]
[mst3 (modulo slide-time 3000)])
(if (< mst3 1000)
"Red"
(if (< mst3 2000)
"Green"
"Blue"))))
(slide/center
(make-reactive
(filled-ellipse (abs (- (until 0 mouse-x) 512))
(abs (- (until 0 mouse-y) 512)))))
(slide
(make-reactive
(pin-over
(blank 500 500)
250 (until 0 mouse-y)
(text "Hello" 'default 24
(until 0 (- (/ mouse-x 150)))))))
(slide/title "A Simple example"
(make-reactive
(filled-ellipse (* 100 (add1 (wave 2000))) 200))
(t "FrTime -- Expanding the horizons of slideshow!"))
(slide/title "Changing Text Colors"
(make-reactive
(colorize (t (string-append "This text should be " (color-string))) (color-string))))
(require (lib "class.ss"))
(require (all-except (lib "mred.ss" "mred") send-event))
(slide/title "Explicitly Timed Changes" (make-reactive
(transition/new-time
(filled-ellipse 600 200)
1400
(lambda () (transition/new-time
(filled-ellipse (* 100 (add1 (wave 2000))) 200)
2300
(lambda () (colorize (disk (* 100 (add1 (wave 2000)))) "green")))))))
(slide/title "Hypnotic Colors"
(make-reactive
(colorize (filled-ellipse 200 100)
(scale-color (+ .5 (* 6 (wave 2000))) "Blue"))))
(slide/title (make-reactive (color-string))
(make-reactive (t (color-string)))
(t "(even the title can vary with time!)"))
)