Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MOTOWN flash website... HOW do they do this?

Status
Not open for further replies.

Doum

Programmer
Dec 17, 2001
6
CA
do you have an idea how they did the motown classic website?
i'ts pretty nice!
i want to do the scroll bar with the inertia and the rebond at the end.

i'm not to good at math so if you have any idea please let me know! :)
thanx!

doum
 
The maths behind the scrolling is really easy: all you need to do is know the position that your menu is at now; the position you want it to get to and the speed you want it to move at.


Here's the idea applied to a moving clip...


onClipEvent(enterFrame){
//how far is the clip from the target?
difference=target-_x;

//set the speed of the scroll
difference=difference/speed;

//move the clip
_x+=difference;
}


For a simple version of a menu similar to Motown's you just need a single large clip for the menu items the position of which is controlled by a series of buttons each of which set "target" to a new value.
 
Check this :

faq250-1433 Regards

Big Bad Dave

davidbyng@hotmail.com
 
thank you!
it's a good start.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top