View Full Version : [F5]Need Help Whit Slide Menu!
dana
February 14th, 2003, 04:03 AM
hello,
i saw a graet menu at www.bukwild.com.
when i done this i used this script, but didn't work the same! PLS help!
onClipEvent (load) {
inertia = 0.6;
k = 0.1;
}
onClipEvent (enterFrame) {
x = -this._x+_root._xmouse;
xp = xp*inertia+x*k;
_x += xp;
}
pls have a look at www.bukwild.com and tell me how you think that it is done! The buttons go after each other but not above each other.
thanks!
pom
February 14th, 2003, 06:50 AM
Well, I think those are just rollOvers... I don't quite see where you could put that code :-\
dana
February 14th, 2003, 10:13 AM
the buttons follow the mouse, but they don't just follow the mouse. there is a differt of space between them.
So it can't be just a rollover!
but thanks anyway.
pom
February 14th, 2003, 07:25 PM
Oups sorry, I didn't see that. It's just easing with different easing speeds. Read the tute about easing and everything should be clear. Otherwise, just :trout: Lost
dana
February 18th, 2003, 03:54 AM
Thank you! it workt!
But know i have a nother problem whit it; when i put a nother button on the stage whit the same action script, the 2 buttons are on the same place.
On the site www.bukwild.com they not on the same place and they not go above each other. How can i fix this?
Can you or some one else please help me?
greetz dana
pom
February 18th, 2003, 05:00 PM
Show me your code :)
lostinbeta
February 18th, 2003, 09:57 PM
I know I have a lot of fun playing with Robert Penners Easing Equations ;) (A bit advanced, but fun none-the-less)
http://www.robertpenner.com/scripts/easing_equations.txt
pom
February 19th, 2003, 03:34 AM
They are definitely advanced, but the good is: you don't have to worry about that. All you need is to call the function with the right parameters and voilą :love:
Robert Penner is scary... :o
lostinbeta
February 19th, 2003, 03:37 AM
You know me with my easing Ilyas... I have a natural love for Robert Penner for creating these!
And why is Penner scary?
pom
February 19th, 2003, 03:39 AM
Because he's so damn good :crazy: I don't think I've ever opened one of his files and actually understood how it worked :-\
lostinbeta
February 19th, 2003, 03:43 AM
I understand some of the easing equations, but yes, he is too damn good. People like that make me feel bad at Flash.... :(
dana
February 19th, 2003, 04:30 AM
thanks for your advice, But i didn't understant the link of robert.
I write my script down maybe so i can explain it moore.
I have 3 MC and in each MC i have a button.
MC1 has this scrip:
onClipEvent (load) {
_x = 0;
speed = 5/1;
}
onClipEvent (enterFrame) {
endX = _root._xmouse-50;
_x += (endX-_x)/speed;
}
dana
February 19th, 2003, 04:32 AM
MC2:
onClipEvent (load) {
_x = 0;
speed = 5/2;
}
onClipEvent (enterFrame) {
endX = _root._xmouse-30;
_x += (endX-_x)/speed;
}
dana
February 19th, 2003, 04:33 AM
MC3:
onClipEvent (load) {
_x = 0;
speed = 5/3;
}
onClipEvent (enterFrame) {
endX = _root._xmouse-10;
_x += (endX-_x)/speed;
}
dana
February 19th, 2003, 04:34 AM
It work but only to the right. When you go to the left, he pic the button on the right first. I preciat that you will help me, thanks for that!
pom
February 19th, 2003, 05:54 AM
Sorry? What happens when you click on the left? :q:
dana
February 19th, 2003, 05:57 AM
maybe i have to include some frame actions.
Something like:
stop ();
if (_root._xmouse>0) {
gotoAndStop (2);
}
dana
February 19th, 2003, 05:58 AM
when you slide whit your mouse to the left, the first button that goes that way is the button on the right.
dana
February 19th, 2003, 05:59 AM
i'm sorry if mine english is not to good. i'm from holland!
pom
February 19th, 2003, 06:03 AM
No prob :) I just wanted to make sure of the problem (I don't speak that well either, I'm a poor Frenchman :trout: )
Anyway, what you could do is change the speed depending on the direction the clips are moving. Something like this:
onClipEvent (load) {
_x = 0;
speed = 5/3;
}
onClipEvent (enterFrame) {
endX = _root._xmouse-10;
if (endX > 0) speed=5/3;
else speed=5/1;
_x += (endX-_x)/speed;
}Or something like this.
pom :cool:
dana
February 19th, 2003, 06:06 AM
i will try that!
i let you know if it work.
Thanks!
dana
February 19th, 2003, 06:17 AM
The script was a little bit different but it works!!!!
Thank you!!!!!
i used this scrip:
onClipEvent (load) {
_x = 0;
speed = 5/1;
}
onClipEvent (enterFrame) {
endX = _root._xmouse-10;
if (_xmouse-10 > 0) speed=5/3;
else speed=5/1;
_x += (endX-_x)/speed;
}:beam:
pom
February 19th, 2003, 09:22 AM
Please show us when you're done with your menu :)
dana
February 19th, 2003, 09:27 AM
i will. But how can i send my fla or swf to this message?
lostinbeta
February 19th, 2003, 01:08 PM
In the reply window there is a section that says "Attach file:" your file must be small enough to post here though :)
dana
February 20th, 2003, 03:56 AM
i wanted to thank you very much. You have been a big help!
lostinbeta
February 20th, 2003, 04:12 AM
I get an error when trying to open. You must be on a mac :-\
Try putting it in a .zip file and reattaching it.
Meanwhile, I am off to bed, it is 4:11am here :)
dana
February 20th, 2003, 06:34 AM
well, good niight then! here it is 12:15 and i'm at my work, so.
here it is!
lostinbeta
February 20th, 2003, 12:53 PM
LOL.... man, this thing is just causing trouble all over the place.
Your .zip file gives me an error saying "Cannot open file. Invalid archive".
georgia
February 20th, 2003, 02:34 PM
Are you looking for this menu?
http://www.flashkit.com/movies/Interfaces/Menus/Pop-down-Patrick_-7652/index.php
georgia
tipusultan
February 20th, 2003, 03:20 PM
Hi guys,... Hi Dana
I was actually searching for the same script, i using an arrow instead of a slide, but in either case, how do u control the range?
to make it stop going further when it reaches the last (or the first) button...
Regards,
Tehsin
dana
February 21st, 2003, 07:55 AM
i load this menu into a site so your menu can't go further than that.
is this what you mean?
tipusultan
February 21st, 2003, 01:00 PM
Well what I am doing is my whole site is in flash, and the slider goes all around the site instead of staying within the menu boundaries...
here is what I mean -->
http://www.serindgroup.com/store/consoleStore2.html
but yea i am guessing yur menu is the only flash in the site, and the rest of the site is html?
lostinbeta
February 21st, 2003, 01:34 PM
Use an if statement.
if (this._y <= 100) {this._y = 100;}
if (this._y >= 350) {this._y = 350;}
This limits the _y position to 100 minimum and 350 maximum. Add this with the rest of your code in the onClipEvent (enterFrame).
tipusultan
February 21st, 2003, 02:31 PM
Hey lostinbeta thanks alot
that worked great and i did same thing for the x values for the horizontal menu, it works beautifully...
Thanks,
Tehsin Bhayani
lostinbeta
February 21st, 2003, 02:34 PM
No problem :)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.