Kewl bouncy menu-but how the hell

Hey guys,
I found this great bouncy menu, did the tutorial and all that, but I don’t know how to make the duplicated instance of the button item actually link to different SWF’s or URL’s??? At the moment because an instance of a button is being duplicated via AS I can only make the whole nav link to one place! so what AS do I insert to make each instance link to different place??

hope this makes sense…but either way, its a lovely nav and if anyone can get it to actually work it would be great ;-)))

cheers in advance

oh and here is the link to the original tutorial :wink:
http://www.newarchitectmag.com/archives/2001/08/hall/

I have attached the Fla

Jain

HEY!! jain

the tutorials are out there i guess the link expains it all…
but yes!!! for a new starter like me i guess…we need a layman explaination

chal then…

hey :wink:
I know, but I spent over a day trying out different ways to get it to work and did the tutorial twice over, but … oh well, just hoping that some lurvvvvvvvvvely guru will come to our aid ;-))))

laters…J.

HEY!!! do u know the fundas fo elasticity…
if no then follow this link
www.bit-101.com
in that tutorials…u have a wounderfull explaination about elasticity.

Later …C.B.

thanks ;-)…that tutorial is based on the original one I posted up…call me dumber and dumberer but I still don’t get how to link the seperate menu items via AS?

ANYONE ANY IDEAS???

Do you just want to know how you can make the buttons work so that the actually link to something?

Viru.

yes :wink: because the menu uses only one button duplicated many times in AS I can only get it to link to one place as there is effectively only one physical button on the the stage, I just dont know how to go into the code to make the instances of the button link to URL’s or call in SWF’s…

can you help?

you could store the url’s in an array… something like this:

onClipEvent (load) {
	numItems = 8;
	friction = .6;
	speedratio = .3;
	boost = 20;
	invboost = -boost/(numItems-1);
	base = 60;
	**urls = ["http://kirupa.com", "http://bit-101.com", "http://ultrashock.com", etc, etc];**
	for (var i = 0; i<numItems; ++i) {
		this.attachMovie("item", "item"+i, i);
		this["item"+i]._x = i*60;
		this["item"+i].text = "Item "+i;
		this["item"+i].speed = 0;
		**this["item"+i].i = i;
		this["item"+i].onRelease = function() {
			getURL(urls[this.i], "_blank");
		};**
	}
}

thanx Kax, :wink: I am no AS guru, so forgive me if I ask stupid questions…but is that the exact code that I would place into the existing code?

I did try placing it in as is, but it doesnt seem to work?

Hmm, i dunno looking at that script doesnt make me think it’ll work, i’ll try that out now,

Viru.

just tried it out with the trace method, no go, good try though mate.

Viru.

hmmmmm…bummer! :frowning:

it works… :sigh:

you rock!!! hmm, wonder why it didnt work when I pasted it in…but deadly thanx Kax…

another question if you have time? the same problem applies to the nav text, they are all duplicates…how do you change the nav text ’ item 0’ ‘item 1’ etc etc to whatever text you actually want it to say…like ’ about me’ or ‘whatever link’…

sorry for being a pain…

:-\

more arrays… :wink:

onClipEvent (load) {
	numItems = 8;
	friction = .6;
	speedratio = .3;
	boost = 20;
	invboost = -boost/(numItems-1);
	base = 60;
	urls = ["http://kirupa.com", "http://bit-101.com", etc, etc];
	**labels = ["about me", "whatever link", etc, etc];**
	for (var i = 0; i<numItems; ++i) {
		this.attachMovie("item", "item"+i, i);
		this["item"+i]._x = i*60;
		**this["item"+i].text = labels*;**
		this["item"+i].speed = 0;
		this["item"+i].i = i;
		this["item"+i].onRelease = function() {
			getURL(urls[this.i], "_blank");
		};
	}
}

PS - I know you can change this part in the code(below) but once again it just duplicates whatever text you place in there…

onClipEvent (load) {
numItems = 8;
friction = .6;
speedratio = .3;
boost = 20;
invboost = -boost/(numItems-1);
base = 60;
urls = [“http://kirupa.com”, “http://bit-101.com”, “http://ultrashock.com”, etc, etc];
for (var i = 0; i<numItems; ++i) {
this.attachMovie(“item”, “item”+i, i);
this[“item”+i]._x = i*60;
this[“item”+i].text = "whatever! "+i;
this[“item”+i].speed = 0;
this[“item”+i].i = i;
this[“item”+i].onRelease = function() {
getURL(urls[this.i], “_blank”);
};
}

again… :stuck_out_tongue:

I love you! :love:

I am going to ask you one more teeny, teeny, teeny weeny question and I promise to give you a back rub if I am ever in Mexico (jauna la loca ;-))) )

what if you wanted to call in swf’s instead of URL’s …

remember I love you… (LOL) :stuck_out_tongue:

assuming that you want to load the SWF’s into a MovieClip called container…

onClipEvent (load) {
numItems = 8;
friction = .6;
speedratio = .3;
boost = 20;
invboost = -boost/(numItems-1);
base = 60;
**swfs = ["aboutMe.swf", "whateverLink.swf", etc, etc];**
labels = ["about me", "whatever link", etc, etc];
for (var i = 0; i<numItems; ++i) {
this.attachMovie("item", "item"+i, i);
this["item"+i]._x = i*60;
this["item"+i].text = labels*;
this["item"+i].speed = 0;
this["item"+i].i = i;
this["item"+i].onRelease = function() {
**_parent.container.loadMovie(swfs[this.i]);**
};
}
}

by the way, i wouldn’t love me if i were you… :stuck_out_tongue:

cheers kax! and remember, spread the love! thats what I’m talking about…spread the love! (LOL)

:love:

thank-you, thank-you, thank-you!