
Flash submissions are emulated via Ruffle. Ruffle is currently in development and compatibility is not guaranteed. Click here for more info.
Just a little silly thing I did for practice with follow eyes. Figured I'd upload it here.
Category Flash / General Furry Art
Species Canine (Other)
Size 800 x 568px
File Size 287.7 kB
Would it be possible to do this in icon form or would that make the filesize so big you couldn't upload it anywhere? Would it depend on colour complexity of the icon?
That's just too awesome. XD I have no idea how to do stuff like that. This was NOT what I was expecting when I clicked on the thumbnail LOL.
That's just too awesome. XD I have no idea how to do stuff like that. This was NOT what I was expecting when I clicked on the thumbnail LOL.
It would be possible to do it in icon size, but icon format no. converting it to a .gif would only make it an animated file and it would no longer follow the mouse, it would probably just always look to the left. You could always do something else that is silly, though, like add a rotation to the eyes or something XD
The simplest way is to create a movieClip to serve as the eye, and than inside it create a movieClip to serve as the pupal. Label that movieClip ('target' in this example) and add you code into the first frame of the eye movieClip. The code looks something like this.
target.onEnterFrame = function() {
//define the onEnterFrame method for the pupal, in this case labled 'target'
var dist = Math.sqrt(_xmouse*_xmouse+_ymouse*_ymouse);
//get the distance from that object to the mouse
var mouseVx = _xmouse/dist;
//get the vectoral relation the the mouse horizontally
var mouseVy = _ymouse/dist;
//get the vectoral relation the the mouse vertically
var eyeRadias = 32;
//define a variable to serve as a maximum distance for pupal to move
dist = Math.min(eyeRadias, Math.sqrt(dist)*2);
//find the distance the pupal should be from the center
this._x = mouseVx*(dist);
//set the object's x position
this._y = mouseVy*(dist);
//set the object's x position
};
target.onEnterFrame = function() {
//define the onEnterFrame method for the pupal, in this case labled 'target'
var dist = Math.sqrt(_xmouse*_xmouse+_ymouse*_ymouse);
//get the distance from that object to the mouse
var mouseVx = _xmouse/dist;
//get the vectoral relation the the mouse horizontally
var mouseVy = _ymouse/dist;
//get the vectoral relation the the mouse vertically
var eyeRadias = 32;
//define a variable to serve as a maximum distance for pupal to move
dist = Math.min(eyeRadias, Math.sqrt(dist)*2);
//find the distance the pupal should be from the center
this._x = mouseVx*(dist);
//set the object's x position
this._y = mouseVy*(dist);
//set the object's x position
};
Comments