Wrox Programmer Forums
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 16th, 2009, 03:41 PM
Registered User
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Java FX Question

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?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Saxon java question amhicraig XSLT 1 December 7th, 2007 01:21 PM
Regex question in Java rangalo Java Basics 2 October 26th, 2006 09:26 AM
VB fx mid -> PHP ? Mantis Pro PHP 1 March 3rd, 2005 10:08 AM
Java question hlchuah77 JSP Basics 2 October 5th, 2004 08:40 AM
A Java question hlchuah77 JSP Basics 0 September 27th, 2004 02:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.