Java Reference
In-Depth Information
onMousePressed: function (e: MouseEvent) {
ballAnim.playFromStart();
}
}
var ballAnim: Timeline = Timeline {
keyFrames: [
KeyFrame {
time: 200ms
values: [cy => 5 tween Interpolator.EASEIN]
action: function () {
if(ball.intersects(paddle.boundsInParent)){
scoreCounter++;
score.visible = true;
scoreAnim.playFromStart();
}
}
}
KeyFrame{
time: 500ms
values: [
cy => (h - rad) tween Interpolator.LINEAR
]
}
]
}
When all the objects are added to the stage and the code is executed, you should get
something that looks like the next screenshot.
 
Search WWH ::




Custom Search