0

Not sure where or how to start, I have the 'like a sir' meme and have placed it on a single webpage http://mr-sir.duckdns.org/ what I want is when the visitor comes and moves around the cursor for the eyeball to move around ?

do I have to make a GIF out of the image first (I recently started using Linux Mint and it has GIMP so I want to make to most of it), then

do what with the java code (I found a stackoverflow link to a question and answer for sample to move an eye ball but its not specific) so not sure ?

btw its my first project to do in Java and using Linux.

Pavle Stojanovic
  • 525
  • 2
  • 8
  • 30
  • (a) The question is too broad. (b) You'll probably need Javascript, not Java. (c) A gif won't help you since the animation in the GIF has to be known in advance, you can't create it based on unknown events. – RealSkeptic Nov 24 '16 at 10:36
  • what do you think I should use, I guess I could use JS\JQuery, I guess I make my own eyeball and limit the container the eyeball can move in ? – Pavle Stojanovic Nov 24 '16 at 10:39

1 Answers1

0

You can achieve that by using a div above the eye, that div would have his border-radius to 50%, to be a ball or something looking like an eye. Then, you need to track the X and Y position of the mouse, and just use transform: translate(X_amount, Y_amount); on that div (the ball). So, you need html, css and js, nothing more. Maybe a package for tracking the mouse position if you can't code it by yourself

João Vilaça
  • 601
  • 1
  • 6
  • 13