Created
November 13, 2011 16:00
-
-
Save ksky/1362259 to your computer and use it in GitHub Desktop.
Revisions
-
ksky revised this gist
Nov 13, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ GroovyFX.start { sg.stage(title: "MediaView Demo", width: 640, height: 380, visible: true) { scene(fill: black) { mview = mediaView(fitWidth: 640, fitHeight: 380) { player(autoPlay: true, source: "<URL to movie file(.flv)>") transition = parallelTransition { rotateTransition(5.s, from:0, to:360) fadeTransition(5.s, from:0.0, to:1.0) -
ksky created this gist
Nov 13, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ import groovyx.javafx.* GroovyFX.start { def sg = new SceneGraphBuilder() sg.stage(title: "MediaView Demo", width: 640, height: 380, visible: true) { scene(fill: black) { mview = mediaView(fitWidth: 640, fitHeight: 380) { player(autoPlay: true, source: "***動画ファイル(.flv)へのURL***") transition = parallelTransition { rotateTransition(5.s, from:0, to:360) fadeTransition(5.s, from:0.0, to:1.0) scaleTransition(5.s, from:0.0, to:1.0) } } onKeyReleased { e -> println "media key: ${e.text}" if (e.text == 's') { mview.effect = (mview.effect) ? null : sepiaTone() } else if (e.text == 'b') { mview.effect = (mview.effect) ? null : gaussianBlur(radius:30) } else if (e.text == 't') { transition.playFromStart() } } } } }