|
|
|
#1 |
|
the cheesy child
Join Date: Dec 2008
Location: Australia
Posts: 321
|
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 |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Sep 2009
Posts: 5
|
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;
}
|
|
|
|
|
|
#3 |
|
the cheesy child
Join Date: Dec 2008
Location: Australia
Posts: 321
|
hi
i wanted to move the movieclip to the mouse, i guess i shouldnt have mentioned the text for confusion purposes. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Sep 2009
Posts: 5
|
|
|
|
|
|
|
#5 |
|
the cheesy child
Join Date: Dec 2008
Location: Australia
Posts: 321
|
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!
|
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|