PDA

View Full Version : Menu Problem


User0607
03-28-2008, 10:25 PM
hello!

I have the main navigation links (Portfolio, About, Contact, and Links) and when you click on them, an external swf opens in the Holder_mc area below the navigation. Those all work fine. However, I want a SUBMENU to open to the right of my main nav links only when you click on Portfolio. That part works fine as well. But when you click on the submenu links, they dont open my swf files into holder_mc. I have no idea how to go about fixing this.
I've tried searching the on internet 'submenu tutorials', 'loading external swf' , read through my book. tried other ways around it. No luck.

I appreciate your time and anyone's help on this. Hopefully I'll get a job out of all this mess!

Here is the link to download the files:

http://www.sendspace.com/file/gcbars

thank you!

atomic
03-29-2008, 01:01 AM
First you need to correct your script in the index.swf...

The correct syntax would be...

holder_mc.loadMovie("intro.swf");

portfolio_button.onRelease = function() {
holder_mc.loadMovie("btn_1.swf");
};

about_button.onRelease = function() {
holder_mc.loadMovie("about.swf");
};

contact_button.onRelease = function() {
holder_mc.loadMovie("contact.swf");
};

And not...

holder_mc.loadMovie("intro.swf",1);

portfolio_button.onRelease = function() {
holder_mc.loadMovie("btn_1.swf",1);
};

about_button.onRelease = function() {
holder_mc.loadMovie("about.swf",1);
};

contact_button.onRelease = function() {
holder_mc.loadMovie("contact.swf",1);
};


Next for your buttons within the submenu mc...

Directly on the btn_1, for example...

on (release) {
_parent.holder_mc.loadMovie("about.swf");
}

Of course change the about.swf for the appropriate file name...

If you want to define the button handlers on a frame action, as you did above for the main menu, you would then add the following actionscript on frame 2 of the submenu mc...


btn_1.onRelease = function(){
_parent.holder_mc.loadMovie("about.swf");
};

btn_2.onRelease = function(){
_parent.holder_mc.loadMovie("contact.swf");
};

//Etc...