DZone Forums
Go Back   DZone Forums > Community > Languages & Frameworks > Java
Reload this Page Java FX Question
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Mar 2009
Default Java FX Question - 04-15-2009, 12:38 AM

Hi all, first let me say that I am a total newbie and I don't know if I posted this in the correct place, if I didn't Im sorry.

I have some scripting experience (html, perl, css) but not a lot of Java experience and no java FX.

I've been playing a game that uses Java FX for challenges... for example you have to repair the script before you can read clues that come across the screen when you run the app.

Ok so that said, I was trying to change this app they gave us to play with. It is a little screen saver where different elements float around on the screen. One of the other players asked if anyone could add the faces of the guys from the game and some other graphics.

I figured out how to add the images using the code below in the Screensaver.fx file of the app.

Code:
         //My Code
                 var ip = ImageParticle {
         imageView: ImageView {
         image: Image {
         url: "{__DIR__}resources/hector4.png"
         }
         }
         }
         particleSystem.createPointParticle(ip, 450, 350);

                          var ip1 = ImageParticle {
         imageView: ImageView {
         image: Image {
         url: "{__DIR__}resources/alienteapot4.png"
         }
         }
         }
         particleSystem.createPointParticle(ip1, 205, 125);

                          var ip2 = ImageParticle {
         imageView: ImageView {
         image: Image {
         url: "{__DIR__}resources/Baron4.png"
         }
         }
         }
         particleSystem.createPointParticle(ip2, 95, 220);

                          var ip3 = ImageParticle {
         imageView: ImageView {
         image: Image {
         url: "{__DIR__}resources/dotcup4.png"
         }
         }
         }
         particleSystem.createPointParticle(ip3, 500, 170);

                                   var ip4 = ImageParticle {
         imageView: ImageView {
         image: Image {
         url: "{__DIR__}resources/orangecup4.png"
         }
         }
         }
         particleSystem.createPointParticle(ip4, 175, 330);

         //end my code
There are two other files that I believe to be important to this one, one called Main.fx and one called ImageParticle.fx. I believe the ImageParticle.fx file tells elements that are assigned as ImageParticles how to behave, bascially to float randomly around the screen.

Im unsure what code samples someone would need to help because I am so new to this. (if you want to see all of it you can download it at P.I.E. File Access) I don't want to flood the forums with a bunch of code that no one cares about.

So what I would like to do is get my images to slowly roate as they float around.


I have searched Sun's JavaFX site and can not find out how to do this. Please help?

Laney
Reply With Quote
Reply

Tags
javafx, netbeans, pietheory

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about Applet ? jaypaul Java 1 04-15-2009 02:39 AM
Build new RCP on IDE or not? That is the question. AndrewB Eclipse 0 10-30-2008 08:59 AM
plugin question jtalafous Eclipse 0 09-19-2008 06:16 PM
A curious question... gamby Eclipse 0 02-27-2008 06:45 AM
EMF Question jdc3 Eclipse 0 02-26-2008 09:21 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com