-
On Mouse move
Hi all,
I am trying to move an "mc" when my mouse moves.
I used these 3 lines of code which does the job but i was wondering how can i apply an "ease" effect so that my "mc" moves smoother!
onMouseMove = function() {
contents._y = (_root._ymouse);
updateAfterEvent();
}
Any help is appreciated.
Thanks
-
Can you post a preview of what you're working on? You may just need to add a tween...
-
On Mouse move
I basically found what i wanted to do.
"contents" is the instance name of my movie clip.
------------------------------------------------------
contents.onEnterFrame = function() {
var yMouse = _root._ymouse;
if(Math.abs(yMouse - this._y) < 1) {
this._y = yMouse;
} else {
this._y -= (this._y-yMouse) / 6;
}
}
-----------------------------------------------------
Thanks for the interest anyway!
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
|
Click Here to Expand Forum to Full Width
|