-
the cheesy child
Movieclip scrolling to mouse
hello everybody, i have text put into a movieclip ready to scroll ;D
i've been mucking around for ages and cant get the movieclip to scroll automatically to the mouse.
heres my script so far:
onClipEvent(load){
he = 400;
top = 0;
bottom = _height;
}
onClipEvent(enterFrame){
ym = _root._ymouse;
}
of course the top of the movieclip is where the text starts.
basically i want to make it so that the higher the mouse is the faster it moves up until it hits the top, and the lower it is the faster until it hits the bottom.
I have tried stuff and it hasnt been working so please help out
Julian
-
I didn't quite understand what you wanted to do. Do you want to move the text inside a Movie Clip or you want to move the Movie Clip which the text is in?
Anyway here's a simple way to make a Movie Clip follow the mouse with ease. Increase the easeLevel for smoother ease.
Code:
onClipEvent(load){
var easeLevel = 10;
}
onClipEvent(enterFrame){
_y += _ymouse/easeLevel;
}
-
the cheesy child
hi
i wanted to move the movieclip to the mouse, i guess i shouldnt have mentioned the text for confusion purposes.
-
Originally Posted by bounceboy
i wanted to move the movieclip to the mouse, i guess i shouldnt have mentioned the text for confusion purposes.
It's cool.
The previous code that I gave you should do the trick, but it'll only follow in Y-AXIS.
-
the cheesy child
oh yeah sure if i could be bothered i would probably add in x axis later... would be easy now that i have the script =) THANK YOU SO MUCH!
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
|