1) RoarkyGroup: Members Posts: 3Joined: 16 Mar 2008Location: GermanyIP: 91.89.--.--
Posted:
Hi Angus,
a great script, very usable for non-script people like me, too.
I just can't figure out one thing - I'd like to make a sliding animation UPWARDS. Your downwards script goes like this:
if (!counter) mD.origY = lyr.y(); var newY = (menuH+2)-(menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75); lyr.clip(0, newY, menuW+2, menuH+2); lyr.y(mD.origY - newY);
What do I need to change in order to make it go upwards, having the same animation effect?
Thank you!
Roarky
2) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 118.92.--.--
Posted:
See the comments in the latest version of pop_data.js, it *should* have a comment in there within the menuAnim function with a line that you can uncomment to enable upwards animation...
- Angus.
3) RoarkyGroup: Members Posts: 3Joined: 16 Mar 2008Location: GermanyIP: 78.42.--.--
Posted:
Sorry to bother you again, Angus.
You made an example on a clipping animation, but not on the Move+clip sliding animation which you suggested below:
// Straightforward downwards clipping animation (default setting): lyr.clip(0, 0, menuW+2, (menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75) ); // If you want, comment out the above line and enable this one to animate bottom-upwards: //lyr.clip(0, (menuH+2)-(menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75), menuW+2, menuH+2);
I tried around with my limited programming knowledge, but didn't succeed in making this one go upwards.
Roarky
4) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
Oh sorry. Er, yeah, that'll be a little more programming then :). Am a little busy at the moment to do it for free but you'll need to edit the lyr.clip and lyr.y calls. lyr.clip accepts 4 parameters (top, right, bottom, left) and you'll want to alter the bottom rather than the top according to the calculation (leave the top at 0). lyr.y meanwhile should also be reversed so the menu moves up rather than down.
If you want to hire me to modify it email me: /contact/
- Angus.
5) RoarkyGroup: Members Posts: 3Joined: 16 Mar 2008Location: GermanyIP: 91.89.--.--
Posted:
Hi Angus,
thanx for your kind help - the problem solved itself: people who looked at my design liked the downwards sliding menu much better.