Java Reference
In-Depth Information
strokeWidth: 3
}
]
}
def rect = Rectangle {x:10 y:10 width:50 height:20 fill:Color.RED}
ParallelTransition {
content: [
RotateTransition {
node:circles duration:1s byAngle:360
repeatCount:FadeTransition.INDEFINITE
autoReverse:true
}
TranslateTransition {
node:circles duration:3s byX:w/2
repeatCount:FadeTransition.INDEFINITE
autoReverse:true
}
TranslateTransition {
node:rect duration:3s
byY:h-30
repeatCount:FadeTransition.INDEFINITE
autoReverse: true
}
]
}.play();
When the application is executed, the circles are animated from left to right, while the
rectangle moves from top to bottom simultaneously, as illustrated (as well as possible)
in the next figure:
 
Search WWH ::




Custom Search