Java Reference
In-Depth Information
action:
function(value:Number):Void {
println("Change: {value}");
var inProgress =
animation.running and
not animation.paused;
if( inProgress) {
animation.pause();
}
animation.time =
Duration.valueOf(
value * 1000);
if(inProgress) {
animation.play();
}
}
},
ProgressSlider {
label: Text {
content: "Rate: " }
width: 200
minimum: -5.0
maximum: 5.0
value: bind animation.currentRate
action: function(value:Number) {
animation.rate = value;
}
}
]
}
]
}
}
}
Total Solar Eclipse Examples
The total solar eclipse provides a good example of animating movement along
with visual changes. During a total solar eclipse, the moon moves across the sun
causing a period of darkness during daytime. There are also effects on the sun,
with a sun burst visible right before and right after totality. Presented here are
two examples of basically the same animation. The first one is based totally on
JavaFX shapes, whereas the second example uses the graphical objects generated
using JavaFX Production Suite we covered in Chapter 2, JavaFX for the Graphic
 
Search WWH ::




Custom Search