To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > General Help > Math and Physics

Reply
 
Thread Tools Search this Thread Display Modes
Old 09-03-2009, 07:11 AM   #1
bounceboy
the cheesy child
 
bounceboy's Avatar
 
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
__________________
bounceboy is offline   Reply With Quote
Old 09-03-2009, 09:20 PM   #2
MichealStar
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;
}
MichealStar is offline   Reply With Quote
Old 09-04-2009, 04:02 AM   #3
bounceboy
the cheesy child
 
bounceboy's Avatar
 
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.
__________________
bounceboy is offline   Reply With Quote
Old 09-04-2009, 04:19 AM   #4
MichealStar
Junior Member
 
Join Date: Sep 2009
Posts: 5
Quote:
Originally Posted by bounceboy View Post
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.
MichealStar is offline   Reply With Quote
Old 09-07-2009, 04:12 AM   #5
bounceboy
the cheesy child
 
bounceboy's Avatar
 
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!
__________________
bounceboy is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > General Help > Math and Physics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:17 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.