• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in movement logic

 
Punit Jain
Ranch Hand
Posts: 1012
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry if i am posting this in wrong thread.


code is working, but there is some problem in my movementFish function, i tried allot but don't know where the problem is.
the problem is:
my x and y positions are 90 and 50,
sp.getHeight is 280 and sp.getWidth is 480.

when my image reached to 480 it reversed but now after reversing when it comes back(moving) to it's 0(zero)th position my y direction not changing while it's moving, it's moving continually at the top of frame, i mean to say, while coming back to 0th after reaching to 480, it only moving from left to right not top to bottom also (i mean y is not working only x is working).??
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
probably best to keep it all in the one thread, saves duplication of responses

http://www.coderanch.com/t/568233/GUI/java/reverse-image
 
Punit Jain
Ranch Hand
Posts: 1012
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry for that...
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No need to be sorry, posting a new topic
for a new problem is the right way to go.

A topic with 0 replies will get more attention
than a topic with 20+ replies.

The problem was resurrecting the old topic
at the same time, making this new topic redundant.

All you needed to do, in this new topic,
was to include a link to the old topic and
there would have been a natural flow.
 
Punit Jain
Ranch Hand
Posts: 1012
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay...
Thanks for the suggestions..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic