Sliding/Infinite Menu

onClipEvent (load)
onClipEvent (enterFrame)
var distance=_root._xmouse-xcenter;
if (_x > 0) _x=-754;
if (_x < -754) _x=0;


Ok i did the tutorial but something is wrong cuz when i created my own little sliding thingy and i put my mouse so it slides left or right on the right side it cuts off a bit when going infinite.

I think its something to do with the positioning of my menu because its not on x=0 its on x=120.8 and i was trying to work out how to fix it but i’m stuck…and when i move the menu to x=0 it works nicely…please helP! what values do i need to change?

Post your .fla so somebody can give better help.

well its actually a tutorial from this site with a few changes…just length and positioning…


Post your .fla so somebody can give better help.

might be a localToGlobal issue… though I’ve never gotten that to work correctly so… I guess I really don’t have an answer. :slight_smile:

sorry guys i’ll post the .fla now

could someone also correct the center for me…

thanks for all your helP!

Fixed it! The numbers were all a bit wrong…
hehe took me about 2min :slight_smile:
NB! Change the line
var distance = _root._xmouse-xcenter;
var distance = (_root._xmouse-xcenter)
so If you move the cursor to the left the menu moves to the right… more comfortable. If I see “pictures” on the left that I move my cursor to the left to click on it but if you don’t add “*-1” then the button “pictures” moves away from the cursor and that’s annnoying…**

ok thanks…but what numbers do i have to change?

because it still seems to cut off on the right of the slide JUST after the number 6 appears…

OOPS! Stupid me! How didn’t I notice!
I forgot to attach the .fla and din’t notice it! :stuck_out_tongue: silly me :slight_smile:
there ya go :slight_smile:

thanks alot!


…ok i wanted one more thing to be added…

i would love to know how to make it pause slightly after the mouse isn’t over the strip…like on the sony website…where it moves the mouse goes over then it goes somewhere else and the strip is paused and then slowly starts moving again…
do you know what i mean?

oh & another question…how do i make the movement of the strip subject only when the mouse is over the strip…not around it…

where on the sony site… I went and didnt see anything - their site is so big I didnt really feel like searhing.


I thin what you mean by that 1. question but… maybe explain a bit more…
that second one doesn’t look hard though!
you can detect where the mouse is before moving the slider

if((_root._xmouse>=100) and (_root._xmouse<=300) and(_root._ymouse>=200) and (_root._ymouse<=400)) {
the actions here

or something like that! OR you can use hitTest which is easier!

I just remembered! If you use hitTest then you have to make a movieclip follow the mouse cursor and detect the movieclips position!

THis is the SONY Link

Ok now here’s what i want to do.
-Firstly i want constant movement to the left or whatver…then when the mouse goes over it moves to relative position (that parts done)
-And THEN i would like it if your cursor goes off the moving menu it pauses slightly then starts rolling again just like in the SONY site. BUT i don’t want arrows…


now you should know how to detect if the cursor is not on the menu.
and this should work…

if not on menu… {
nohittimer = getTimer()/1000
if(getTimer()/1000-nohittimer >= 2) {
_root.menumove = true;

this detects if 2 seconds have elapsed since the cursor moved out of the menu area. the next should be put on a movieclip

onClipEvent(enterFrame) {
if(_root.menumove) {
mymenu._x += 2;

This makes the menu move.
and you also have to make _root.menumove false when you move the cursor on the menu…

thanks alot SYKO!

i worked out how to make the menu not move when i’m not around it…

BUT i can’t make it move by itself …maybe its because i put all your code into my movieclip of the menu???

where do i put the timer code etc?

i found out how to make the menu move by itself BUT the 2 sec “pause” isn’t working…

EDIT* also when the menu is moving by itself does not repeat…just passes once…i’m trying to work that out now *EDIT

I really need some good old help here…

All i need to work now is that when the Sliding Menu moves by itself it should repeat and appear infinite, because at the moment it passes once…i can’t seem to get it to repeat! aaaaarrgghh…
please read the above points for your reference…