Complex Animation = "n" Basic Animation

Some developers ask me "what is the future of JavaFX". Actually I can't say, because I am not a future maker. But yes it depends how honest your effort is, how consistent your effort is. We are doing best from our side. Talks apart, we have published some more article on JavaFX official site. Basic and awesome :).

1. In any RIA language which provide a great easiness for developer, one of the most important things you know is how to manage animation and so, timeline. Nancy, has written detailed article on how to play with timeline : "Animation Basics for JavaFX Beginners"

2. She has written one more article on Reloading Data. Actually reloading is a tricky part not in terms of mind but in terms of ways to do. Sometime, you want ball to be at initial position, sometime you want it to be at random position, sometime final position is initial position.

These 2 articles are related and both as one give a good picture of animation.

3. Very important to know this. How to run JavaFX Application offline. Thomas, guru of JWS, has written one article speaking about what all things to take care when you want JavaFX Appliation to run offline. As most of us know, JavaFX has lot to do with deployJava.js, Java Logo Image.

 Have Fun !

Comments:

hi m doing golf game in javafx..m beginner... i worte some code for golf stage,m not able to rotate duke image at 360degree.. m posting u my code..pls help me..

import javafx.scene.\*;
import javafx.scene.shape.\*;
import javafx.scene.paint.\*;
import javafx.animation.\*;
import javafx.animation.Timeline;
import javafx.animation.KeyFrame;
import javafx.animation.Interpolator;
import javafx.scene.effect.\*;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.paint.Color;
import javafx.scene.shape.Arc;
import javafx.scene.shape.Circle;
import javafx.scene.transform.Transform;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.Group;
import javafx.scene.paint.LinearGradient;
import javafx.scene.paint.Stop;
import javafx.scene.effect.Reflection;
import javafx.scene.shape.\*;
import javafx.scene.shape.Path.\*;
import javafx.scene.input.MouseEvent;
import javafx.scene.Cursor;
import javafx.scene.Node;
//import com.jfxbuilder.fx.\*;
//var img = Image {};
// Scene Definition
var scene = Scene {
fill: Color.web("#3D9E6D")
width: 600
height: 400
content: [
Path {
elements: [MoveTo {x: 0, y: 0},
LineTo {x: 540.927, y: 1.45},
LineTo {x: 543, y: 320.55},
LineTo {x: 0, y: 322},
LineTo {x: 1.036, y: 195.811},
LineTo {x: 486.006, y: 195.811},
LineTo {x: 486.006, y: 98.631},
LineTo {x: 1.036, y: 98.631},
ClosePath { }]
translateX: 27
translateY: 144
//width: 543
//height: 322
stroke: Color {red: 0.8, green: 0.8, blue: 0.8}
strokeWidth: 3
fill: Color {red: 0.2, green: 0.6, blue: 0.2}
effect: DropShadow {
offsetX: 5
offsetY: 5
radius: 19
color: Color.color(0, 0, 0, 0.651)
}

},
Circle{
//translateX: 514
//translateY: 217
centerX: 55
centerY: 198
radius: 10
fill: Color.WHITE
stroke: Color.BLACK
//width:21
//height:19
opacity: 0.93
//length: 360
//stroke: Color.WHITE
strokeWidth: 3
//fill: Color.WHITE
effect: GaussianBlur {
radius: 1
}
},

Rectangle{
x:40
y:400
width:20
height:20
//arcWidth:20 arcHeight:55
stroke: Color.GREEN
fill: LinearGradient{
startX:0,
startY:0,
endX:1.1,
proportional: true
stops:[
Stop{
offset: 0.0
color: Color.GRAY},
Stop{
offset: 1.0
color: Color.BLACK}
]
}
},

Circle{
// translateX: 10
//translateY: 10
centerX: 50
centerY: 410
radius: 6
fill: Color.WHITE
stroke: Color.WHITE
},
ImageView {
translateX:20
translateY:390

image:Image{url:"File:///E:/duke.png"}
//transform: [translate (200.0,10.0),rotate(60,100,100)]
//width:20
//height:50
}

]
};

Posted by dhiraj singh on May 06, 2009 at 10:50 PM IST #

Sorry not able to see your code. How you want to rotate dude. Rotate simple will do rotation on axis.

What type of rotation you are looking for ... around any axis ?

Posted by Vaibhav on May 10, 2009 at 02:24 AM IST #

Post a Comment:
Comments are closed for this entry.
About

Hi, I am Vaibhav Choudhary working in Sun. This blog is all about simple concept of Java and JavaFX.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today