View Full Version : drop down menu action script trouble
jaredlet
11-07-2005, 07:47 AM
I am attempting to make a drop down menu off one of the links in a navigation bar. I decided to make the button seperately and import it to library and drop it in the navigation bar. I am having trouble with the action script...i only have 2 frames and wasnt sure if i needed any...i tried multiple options...this code...
on (rollOver) {
gotoAndStop(2);
}
...seemed logical but gave me weird results. Any help would be greatly appreciated. I have attatched both the navbar .fla and the button .fla.
meeron
11-08-2005, 08:51 PM
hi, do you have something like this in mind?
jaredlet
11-09-2005, 05:24 PM
ya...that is pretty close to what i have in mind....i was hoping to have each text that drops down be in its own box so that i can make buttons/movies with them as well. Will the actionscript that you used work the same if I change only the drop down? BTW thanks for your help....much appreciated.
meeron
11-09-2005, 05:45 PM
you can use the AS on every dropdown you want to.
but dont forget to duplicate the movieclip if you want different content
in the movieclip.
jaredlet
11-10-2005, 07:54 PM
One more quick question in the code you used
on(rollOver) {
_root.dropdown_prod._visible = 1;
}
on(rollOut) {
_root.dropdown_prod._visible = 0;
}
What does the visible = 1 and visible=0 do? If I had more than one item dropping down would i want to change that accordingly? Or is that kinda like a true/false conditional statement? Also does .dropdown_prod. refer to a name? If i was to use this script would i then need to change the name? Thanks again for your help!!!!
I also noticed that used a button state to do the dropdown...would it be possible to do the dropdown and the color change rollover in the same button? Or would I need a movie in a movie?
meeron
11-11-2005, 12:40 PM
1/0 is a true/false statement.
.dropdown_prod. it relates to the instance name from the the movieclip (left bottom corner). if you want to use several dropdown instances then you have to change the instance name, e.g. dropdown_home.
and the same in the code:
on(rollOver) {
_root.dropdown_home._visible = 1;
}
on(rollOut) {
_root.dropdown_home._visible = 0;
}
somraa
12-15-2005, 09:10 PM
Hi all
I did this menu as practice, only I need an easy way to make [[Bumpers || Tires || Body]] each word to link to a different link.
Thanks
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.