Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 533059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:28:11+00:00 2026-05-13T09:28:11+00:00

I just started with JavaFX and as usual when learning a new language I

  • 0

I just started with JavaFX and as usual when learning a new language I started with a little project.

As far as I understand

at(0ms) {
    //change values
}, 

is only a shortcut for

    KeyFrame {
        time : 0ms
        values : //change values
    }

so why does my code to move pacman does two completly different things depending on which method I use? The first version works as expected (moves in the correct direction and opens/closes his mouth), while the second messes up (the startAngle doesn’t change, he stays at his position, but the length variable changes)

               at(0ms) {
                    startAngle => angle + 45;
                    length => 360 - 90;
                }, 
                at(150ms) {
                    startAngle => angle;
                    length => 360;
                }
                at(300ms) {
                    startAngle => angle + 45;
                    length => 360 - 90;
                    row => newRow;
                    column => newColumn;
                }


                KeyFrame {
                        time : 0ms
                        values : {
                            startAngle => angle + 45;
                            length => 360 - 90;
                        }
                },
                KeyFrame {
                        time : 150ms
                        values : {
                            startAngle => angle;
                            length => 360;
                        }
                },
                KeyFrame {
                        time : 300ms
                        values : {
                            startAngle => angle + 45;
                            length => 360 - 90;
                            row => newRow;
                            column => newColumn;
                        }
                },

And if we’re at it, how can I create a timeline with variable time values? I tried using a Duration variable, but that doesn’t work the way it should. E.g. time: 1000ms does something completly different than time: timePerMove with
var timePerMove : Duration = valueOf(1000);

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:28:11+00:00Added an answer on May 13, 2026 at 9:28 am

    Ok, found out myself:
    You cannot write something like

                        values : {
                            startAngle => angle;
                            length => 360;
                        }
    

    it does compile but it doesn’t work the way it should.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 310k
  • Answers 310k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It depends on a server configuration. If you're working with… May 13, 2026 at 10:06 pm
  • Editorial Team
    Editorial Team added an answer If you are using BinaryFormatter, then it will be virtually… May 13, 2026 at 10:06 pm
  • Editorial Team
    Editorial Team added an answer The easiest way is to style a ListBox to use… May 13, 2026 at 10:06 pm

Related Questions

Has anyone seen JavaMail not sending proper MimeMessages to an SMTP server, depending on
I have clients who still using dot matrix for making copies of printed documents
Ok I've read an searched all over the web, and I've not found the
We have a very strange error occurring at a developer site which we are
I just started with the WCF REST Starter Kit. I created a simple service

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.