View Full Version : yet another slider menu problem
Hi, i have a problem, and not much brain left
i have a slidermenu with some code i don't understand very well..
so, i can't play with it without messing things up.
as in another topic, i want the slider to stop when my mouse leaves the slider area. I read the topic, i'll try to do that... but it might not work at all.
so i found another solution here http://www.petrut-calinescu.com
i tried last night to change the code so i can maniulate the slider with buttons but ZERO.
can anyone help me, give a hint, or some easy code for that?
OK, i attached the "problem slider"
i didn't manage to solve my problem, the solution i found on the forum was for another type of slider and i wasn't able to isolate the part of code that i need.
so, as i said, my problem sounds like this: how can i make the slider not to "slide" when my mouse pointer is not rolling over it?
a know is something about hitTest... but all my efforts towards this ended with some really strange and unexpected results. :eek:
please help
i'm sorry, hope i'am not spamming my own thread...
i found the exact effect on this site :http://www.verne.be
this is what i want
Ruben
06-02-2004, 09:41 AM
Well, if "sliderMC" would be the movieclip you want to set as the clip that has to be rolled over before the slider 'slides' then you'd have to do something like this inside of sliderMC:
// code for frame1:
if (this.hitTest(_parent._xmouse,_parent._ymouse)){
// here the script that makes the clip 'slide';
}
// code for frame2:
gotoAndPlay(_currentframe-1);
Good luck :) - Ruben
PS. When I looked at your fla I noticed this piece of script:
on (press){
with (_root.main){
gotoAndPlay(2);
}
}
The 'with' thing is often used when a lot of actions are to be assigned to another level, if you've got one action you want to assign to another level you might wanna do this instead:
on (press){
_root.main.gotoAndPlay(2);
}
thanks ruben!
about the "with thing" :D
it's the first thing i've learned in flash, and ,at the same time, a true "screwdriver". i use it a lot!. maybe too much. :)
this slider thing it's getting personal!
IT DOESN'T WORK! :mad:
but i know where i've been wrong. twothings:
1.the slider is made with duplicateMovieClip
2.the slider movie has a mask on one layer, so you won't see two similar items of the menu at the same time. the "slide" means that the menu duplicates and moves according to the mouse behind a mask. BUT, even if in the main timeline you won't see the menu duplicating (because of the mask) hitTest will detect it. so hitTest will work not only on the visible menu, but, aswell, on the invisible duplicated instances of the same menu. So the slider will slide when i put my mouse next to the menu, where the duplicated menus are.
that's why the hitTest method won't function properly
and my mistake was that in the fla i attached i forgot to add the mask :mad:
i tried something that works in theory, but sucks in flash
another same dimension movieclip on top of the slidermovie on the stage, and all hitTest actioscript attached to that.
Any other ideas?
Ruben
06-05-2004, 07:21 AM
Hey Fly, still looking for an answer??
Give me some detailed info on what the menu should look like and I might make you a sample
:) - Ruben
i'm always looking for an answer!! :)
i'l upload the fla tomorow, with all the old problems and... the new ones
ok
here's the slider :)
the big and unanswearable question is...
how to make the slider not to slide when the mouse is not rolling over it? :confused:
the fla shows how is supposed to look like
thank you in advance
Ruben
06-22-2004, 10:56 AM
I'm REALLY sorry about my VERY VERY late respond, when I posted my previous post I had some spare time so I thought I'd help you out, when you replied however I already kinda drowned in stuff to do again, so I didn't have the time to have a look at your sample...
To get to the point: When I published your fla it didn't make much sence...but here's how you can make your sliderclip only slide when your mouse is on the space your sliderclip slides on:
1. On the _root, draw a square where you want the 'hitfield' to be, say, where you want the mouse to be in order for the sliderclip to slide;
2. Convert the shape into a movieclip and give it an instancename of "hitfieldClip";
3. Then on the script that makes the sliderclip slide put this if-statement:
if (_root.hitfieldClip.hitTest(_root._xmouse,_root._y mouse,true)){
// here the script that makes the sliderclip slide;
}
Tell me if stuff worked out or not
:) - Ruben
i tried something that works in theory, but sucks in flash
another same dimension movieclip on top of the slidermovie on the stage, and all hitTest actioscript attached to that.
Any other ideas?
it worked
it seems it doesn't suck in flash, thanks to your code
thanks again
so my fla. is a mess, uh?
:)
Ruben
07-06-2004, 12:11 PM
Hehehe, in my eyes: yes, but that doesn't say much; I suck at reading other people their fla's :o
Glad it worked out for you...
:) - Ruben
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.