File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Simple animation not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Simple animation not working" Watch "Simple animation not working" New topic

Simple animation not working

Vincent Blake

Joined: Mar 11, 2013
Posts: 1
Hello, I'm fairly new to Java and I've encountered my first problem I can't seem to fix. I've been learning Java from a series of online tutorials and a book, I completed the basic tutorials with a decent to good grasp of what was covered in my opinion. I moved on to some game development tutorials and now I am on animation.

Below is the code I have, everything seems to work properly except the animation I want. I have a couple robot png files that were imported. Using the array in the Animation class, I hoped to flip through the sceneIndex to make it appear that the robots eye color was changing back and fourth. As mentioned, its not working, it only stays at the first sceneIndex and does not switch. Any help would be much appreciated.

I apologize if my code is not easy to read. I also have a class called Screen but I wouldn't think that's needed.

I agree. Here's the link:
subject: Simple animation not working
It's not a secret anymore!