Infinite Menu problem

I’m completely new to using Flash (and have no experience using coding…) and have got a real problem…

I followed the tutorial for creating an Infinite Menu and have got that to work.

Problem: I want each of the 4 seperate images in the Infinite Menu I have created to have their own seperate Buttons that will each open different URLs in new windows.

I can get the button to open the URL, but can’t ‘stick’ the button to the moving image (they just sit there while the images scroll).

Could somebody suggest the code I should use to get this to work, as I have no idea how to set it up myself…

Anybody…?

without the code or fla it’s hard to tell you how could you achieve it …

but why don’t you place the buttons inside the same movie clip as the image ?? :slight_smile:

Cheers for that, I’ll see if I can figure out how to do that…

ok =)

if you have any problems attach your file …

Well, as a matter of fact, I still can’t figure it out…

I won’t attach the file, cause its currently 3Megs in size…

The code for the movie clip part of the file is

onClipEvent (load) {
xcenter = 150;
speed = 1/50;
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x += (distance*speed);
if (_x>0) {
_x = -608;
}
if (_x<-608) {
_x = 0;
}
}

and I was wondering whether it was possible to alter this in some way to work for a button…?

The only other thing I can think of would be attaching the original file for the Infinite Menu that I downloaded from the Kirupa tutorial pages…

Cheers for whatever help you can give…

lol … you’re using buttons not movie clips as buttons ? :slight_smile:

sorry … my mistake. is just that i never use buttons [size=1]personally i think that they are useless now in mx[/size] so … there’s no way to get the script working in a button.
use movie clips instead =)

Ah… That actually seems to be a better solution…

Only problem is, now when I test the movie, it opens the URL straight away, instead of when I click on the movie clip…

How do I set it up to open the URL ONLY when the movie clip is clicked on…?

I feel really silly asking so much, but I really have no idea how to do this… But I am learning…

Cheers…

again … without the code or fla it’s hard to tell what the problem is

but you should have in the mc actions something like:

on (release) {
getURL("http://www.somewhere.com", "**_self**");
}

_self specifies the current frame in the current window
_blank specifies a new window
_parent specifies the parent of the current frame
_top specifies the top-level frame in the current window

Sweet as !

That worked perfectly… After a bit of messing around with orders and groupings…

Cheers :beam:

Hey can u guys tell me how u guys did your buttons by using movie clips cause i tried it but it doesn’t work. All i know is that when i made the infinite menu into a movie clip, i can’t click on the menu buttons. And when i put the menu into movie clip and edit it into a button symbol, it still doesn’t work with the GOTOANDPLAY functions.

  1. chances are you’re publishing the swf to flash 5.

  2. are you trying to play a different scene?
    http://www.kirupaforum.com/forums/showthread.php?s=&threadid=22333

:-\

Thankz for the reply, i think i found the answer that i was looking for at

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=22471

would it be to much to ask for a little help here…?

well, i don’t have flash installed in this pc. :-
but you have to adjust the variables depending on the x and width of your menu…

this script should get the correct values for you:

onClipEvent (load) {
xcenter = _x+_width/4;
speed = 1/10;
xright = _x;
xleft = _x-_width/2;
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x += distance*speed;
if (_x>xright) _x = xleft;
if (_x<xleft) _x = xright;
}

now you only need to change the value of the variable speed if needed. =)

*Originally posted by kax *
**well, i don’t have flash installed in this pc. :-
but you have to adjust the variables depending on the x and width of your menu…

this script should get the correct values for you:

onClipEvent (load) {
xcenter = _x+_width/4;
speed = 1/10;
xright = _x;
xleft = _x-_width/2;
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x += distance*speed;
if (_x>xright) _x = xleft;
if (_x<xleft) _x = xright;
}

now you only need to change the value of the variable speed if needed. =) **

is that for my problem? cuaes if so were do i put it? do i replace it with the existing code, or put it in a diferent key frame… thx

yes, that’s for your problem.
yes, replace the existing code.

haha, u own all, thanks a bunch man!

no problem. :wink: