-
sprite animation problems
im a newvie to java and i read your chapter 9 of the java by example tutorial. i scrolled down to see how moving sprite animation was done. i couldnt understand how to change the animation from image to image becuase i saw six dogs on the dog animation and it said: dog = new Image[6]; so i tried making my own animation sequence using a different picture with 5 animation phases and i changed the number to '5' but that didnt work. But then u scrolled down and it said:
//this sets the animation phases
//you can determine the speed of the phases change here
if(ticker>3)
{
if(frame<5)
frame++;
else
frame=0;
ticker=0;
}
and that didnt have any sixs there and the applet works still.....thats when i got confused
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks