Research Log of Web Science Students

Computer Science is not simply programming

paths and binding

leave a comment »

One very interesting feature of JavaFX is that it lets you “bind” variables such that when the value of one changes, the value of the other does as well. This seems to be the solution to our problems with conditionals. Right now, we create a Timeline to manipulate each object’s attributes with x and y coordinates being the most visible of these attributes. The problem is that the animation is created before being played but conditionals would require run time changes to the animation. For example, the instruction if the space ahead is empty move forward, turn left otherwise would force a change to the object’s Timeline and we can do that by manipulating a bound variable. An alternate option is creating multiple Timelines but that would possibly slow the objects down and not allow them to be synchronized if there are many of them.


Written by cathy

September 23, 2009 at 6:51 am

Posted in We PEG

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: