PDA

View Full Version : Finished my Nav Menu



Sorcerer
November 12th, 2002, 12:41 PM
I finally finished my dynamic navigation menu and it actually works. I'd like to thank everyone that helped me out. I am also attaching the fla to this post incase anyone wants to see how I did it or wants to use the menu.

I have added a lot of comments to the top explaining what the constants, variables and functions are/do but most of the code I've left un-commented. If you have any questions on how or why I did something let me know.

h88
November 12th, 2002, 12:49 PM
Cool one Sorcerer. :)

aamiic
January 4th, 2003, 04:20 AM
It looks great, however it's also buggy. I found when testing the movie (without any alteration) that by expanding Button 7, then 6, then 5, etc.. parts would just fall off. You'll see what I mean when you try.

Great menu though!

blah-de-blah
January 4th, 2003, 04:25 AM
are you sure its perfectly fine when i tried it..?!

zephn
April 11th, 2003, 06:09 PM
Is there a way to take the links in this menu and make it so it loads a movie clip into the current movie? instead of sending the user to another url?

Sorcerer
April 11th, 2003, 09:56 PM
Yes, you just need to replace the getURL code on the button and sub button to do what you want.

neverrain
April 19th, 2003, 11:10 AM
Hello,

I try it all the menus worked fine.
I don't like the link to URL on the main buttons.

Cheers,

Billy

lunatic
May 21st, 2003, 06:27 PM
Hi,

Very cool menu system! :thumb:

I have a question similar to Zephn's - instead of getURL would I use something like loadMovie or loadMovieNum to load into a container movie clip?

Also, would the dropdown menu get incorporated into the main fla or be added as it's own swf?

Thanks in advance!

lunatic
May 21st, 2003, 09:18 PM
I have another question as well. I noticed you have this on your TopButton movie clip:

getURL(eval("_root.TopTarget"+TargetNum),eval("_root.TopTarget"+TargetNum+"Frame"));

What would I use instead if I'm only loading external swfs and not linking to urls?

And if I may ask another . . . :beam:

What goes in the targets on the action in the main page? As in:

TopTarget3 = "mysite.html"; TopTarget3Frame = "";

TopTarget3Sub0 = "mysite.html";
TopTarget3Sub0Frame = "";

etc.

Clown Staples
May 22nd, 2003, 03:30 AM
Nice. I am attempting something similar and I need a little help, if you get the chance Sorceror. I'd like mine to have submenus within submenus....

its not quite working

Sorcerer
May 22nd, 2003, 02:49 PM
For lunatic try replacing the getURL with something like this

loadMovieNum(eval("_root.TopTarget"+GrpNum), eval("_root.TopTarget"+GrpNum+"Frame"));

then the top target variables will be the path to your swf to load and the top target frame will be the level to load into. Then make the same kind of change to the sub buttons.

As far as where to load the movie, the way it works now is it will have to set on the root because I designed it to run stand alone on a webpage it uses _root as a reference for almost everything. If you want to change it you'll need to change every place it says _root.


clown what exactly is the problem you are having?

lunatic
May 22nd, 2003, 04:46 PM
Hi Sorcerer,

Well, it didn't quite work. Sorry, I'm something of a newb and a lot of your code is over my head, but I'd really like to get this to work so I can apply it to a project I'm doing.

LoadMovie seems to work better than LoadMovieNum although even with LoadMovie the external swfs are popping up in their own window instead of in the container I put on the main stage. Right now I've got this on the Top Button:


loadMovie(eval("_root.TopTarget"+TargetNum), eval("_root.TopTarget"+TargetNum+"Frame"));

and this on the main timeline action layer:


TopTarget0 = ""; TopTarget0Frame = "";
TopTarget0Sub0 = "button.swf";
TopTarget0Sub0Frame = "container";

I tried "_root.container" also but it does the same thing.

Also, do you know what causes the main button disappear when the subs are shown? Really I don't even need the main buttons to be buttons - just categories for the sub buttons.

Thanks for all your help!

lunatic
May 22nd, 2003, 05:00 PM
oops, actually, I DID get it to work with loadMovie and a container. Duh, my mistake, I totally forgot about the code on the sub group. I'm still having problems though with the top button (main button) disappearing after the first time it is clicked.

Eep! Any suggestions? :)

lunatic
May 24th, 2003, 06:25 PM
Hey Sorcerer, can you think of a reason why my arrow won't turn when the movie is tested?

Also, any reason why the sub menu labels aren't displaying?

Thanks!

Sorcerer
May 27th, 2003, 02:32 PM
not off the top of my head, it's been a while since i've worked on this, if you want to post your fla i could take a look at it when I get some time.

lunatic
May 27th, 2003, 08:29 PM
Thanks sorcerer!

Fla is posted at:

www.humboldt.edu/~mgk9/fla.zip

I fixed the problem with the arrow. I'm still having problem with the labels on the subs. Doesn't makes sense since it's part of the same loop as the main buttons and those label fine.

The other problem I'm having is placing it where I want on the stage. No matter where I move it it defaults to the upper left corner. I would love for it to align to the top of the big map (as it is in the fla). Any ideas?

Thanks!

Sorcerer
May 28th, 2003, 04:19 PM
Seems the problem was with your button, I deleted it and created a new one and it worked. I also went through and added everything inside a movieclip i named menu. Now you should be able to move the movie around and not have any problems.

lunatic
May 28th, 2003, 05:35 PM
Hi Sorcerer,

I tried copying your Menu movie clip onto my stage and it crashes my document! :(

Any other suggestions?

Thanks for your help.

Sorcerer
May 29th, 2003, 02:31 PM
works fine when I copy it, make sure you get rid of the menu code in your actions layer, the code should all be inside the new movie clip, and make sure it is named Menu.

lunatic
May 29th, 2003, 05:58 PM
Yeah, I did that and it still doesn't work. :-\

Sorry to be such a pain in the ***** but now the SubUp function doesn't work and I still don't get any sub labels. When I tried your fla (forlunatic) just on it's own the SubUp function didn't work either. Weird huh? What am I missing? I copied the Menu movie clip as is, as well as the actions on the Sub and Top buttons (there were a few new variable names) and still nothing. I reposted the fla at:

www.humboldt.edu/~mgk9/fla.zip

with the Menu movie clip. If you get a moment would you mind taking a look at it again? Or anyone else out there want to take a peek?

Thanks again! :P

Grub
October 1st, 2003, 11:03 PM
Hi

Sorry to add to your thread. I have posted this before
to no avail.


I am also trying to modify a menu system found on flashkit and am unable to contact the author.

The menu is dynamic and the code I can basically get my head around but am a newbie.

My issue is that I am unable to get the sub-muns to go certain frames with my movie. They were originally set up to use as a getUrl function.

I would really appreciate any help at all I've been trying to get this working for days and am getting desperate

thanks very much guys

lunatic
October 2nd, 2003, 12:28 AM
What exactly are you trying to do? Are you trying to get the menu to load a movie clip or go to another swf instead of a url?

Side note - I noticed your dynamic text box has neither instance name or var . . .

:whistle:

Grub
October 2nd, 2003, 01:43 AM
Hi

I am trying to get each submenu to goto a cartain frame or label
in the timeline.

I just can't work out how to swap the getUrl function with a simple gotoAndPlay function

The text box var should be called title

thanks

lunatic
October 2nd, 2003, 11:42 AM
Well, I'm at work right now so I can't look at my own file until I get home tonight - but I think if the frame you want to go to is on your main timeline then you should be able to just put something like

on(release){
this.gotoAndPlay(frame # or label);
}

Check the reference guide for syntax. When I get home tonight I'll look up how I did it on mine (it was a while ago, sorry) and get back to you. Let me know if you get it to work in the meantime.

Good luck!:smirk:

Scootman
October 2nd, 2003, 05:27 PM
i also noticed that the first fla posted was buggy... not that i generally do it, but i clicked buttons rapidly going upward (to test it) and they did start just shooting off of the screen... just like to mention that

its a cool menu, just kinda buggy

Grub
October 2nd, 2003, 08:41 PM
Hi Lunatic

No luck here!

I have already tried something similar to that with no luck also.

As I mentioned, I am a real newbie but am learning fast

Thanks again for your help

lunatic
October 3rd, 2003, 12:21 AM
Okay, sorry for the delay.

I ended up not being able to fix the little problems that I had with Sorcerer's menu though he contacted me later and offered to help work out the bugs. But in the end I ended up using an xml driven menu created by Lost in Beta with help from Senocular (my two heroes!). I'm not sure where I got it from - maybe off one of their sites. I'll try to find it for you if you'd like.

Anyway, I had a similar problem where the original code is written for loading urls and I wanted to load external swfs. So I made a container movie clip on my main timeline and put this code for loading swfs:

onRelease = function() {
_root.container.loadMovie(this.mySWF);
}

where "mySWF" is the name of the swf on my xml sheet.

Here, I found the files you need. Check this out and if you still have questions let me know. I'd be more help to you on this then the other because I got this one to work.

(You can see it in action at www.humboldt.edu/~mgk9)

:b:

Grub
October 9th, 2003, 10:31 AM
Is it just me or is that xmlmenu.zip an empty archive???

I'm still having no luck triggering the submenus to goto a frame
or label within the timeline!

Anyone???

Please :)

lunatic
October 12th, 2003, 06:08 PM
Sorry . . .


Try this one.