1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help With Java FX?

Discussion in 'Java' started by Laney, Apr 16, 2009.

  1. Laney

    Laney New Member

    Joined:
    Apr 16, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi Everyone,

    I am a total newb when it comes to Java FX, I have some experience with HTML, Perl and CSS but I've never messed with Java before. I am playing a game where you have to repair or add on to little JavaFX applications as challenges in the game. It is a lot of fun and I have learned some things, but I have hit a wall and can't figure out how to do something now. I've searched the Sun site and other Java sites and can not find the answer :confused:

    So there is this little app called a screen saver, where graphics randomly float around on the screen. There are tons of files in this app but I think the important ones are Main.fx, Screensaver.fx and ImageParticle.fx.

    I have figured out how to add my own images to the app. They float randomly around the screen, an action which I believe is controlled by the ImageParticle.fx file.

    I would like my images to slowly rotate as they float around. There are other images in the app that are also controlled by the ImageParticle.fx file, I don't want those to rotate.

    So here is a snip of the code that I used to insert the images

    Code:
         
     
     //My Code, inserts new images into the app
                     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
    Is there any way to add a command to make those images slowly rotate? I'm so new to this I really don't know how else to ask the question. Please please help? :(
     

Share This Page