Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-04-2007, 08:39 PM   #1
Jackwrench
Registered User
 
Join Date: Jun 2007
Posts: 1
Default Drop Down Menu Question

I am relatively new to flash work and I am trying to set up a drop down menu. I have it set up now so that when you roll over a button, it skips to the frame in the movie that contains the animation for the menu that drops down, rather than building the whole menu into a single instance or button.

The problem with doing this, I've discovered, is that when you roll out, the menu does not go away until you roll over another option on the menu, meaning that the drop down stays open unless you open a new one.

I tried creating a transparent shape over the top of the whole menu with a command to return to the first frame of the movie on roll out, but now the problem becomes that you cannot click on any of the buttons because there is a shape over those objects. If I put the transparent shape behind the menu, then whenever you roll onto one of the menu options, the movie resets because you are rolling out on the transparent shape.

Is there a way that I can set up the menu so that when you roll out, the menu closes without having to open a new one without making the menus invididual instances and/or buttons? Please let me know if I am being unclear or if I need to provide more info as I'm new to posting on these forums.

Thanks in advance for the assistance!

-J
Jackwrench is offline   Reply With Quote
Old 06-05-2007, 12:29 AM   #2
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Try this...
Attached Files
File Type: zip dropMenu.ZIP (5.7 KB, 379 views)
atomic is offline   Reply With Quote
Old 10-18-2007, 04:50 PM   #3
neo-n27
inosmniac
 
Join Date: Oct 2007
Posts: 6
Send a message via Skype™ to neo-n27
Unhappy I have similar problem, can you advice?

Hi, I post my code, I did alone. There is a MC named bar0 on the Scene and this same bar (button) is linked in Library as bar.

My wish was to:
- attach multiple bar's from Library to the one on the Scene,
- slide all of them down from the main bar, when it's clicked,
- rollover on some menuitem on the Scene, which can't cause close() function to be launched

//----- CODE

odstep=0;
ilosc=5;
speed=3;


var napisy = new Array('menu','element 1','element 2','element 3','element 4','element 5');

function open() {

for (i=1;i<=ilosc;i++) {
this.attachMovie('bar','bar'+i,i);
this['bar'+i]._y=bar0._y;
this['bar'+i]._x=bar0._x;
this['bar'+i].endY = bar0._y + i*(bar0._height+odstep);

this['bar'+i].onEnterFrame = function() {
this._y += (this.endY-this._y)/_root.speed;
}

this['bar'+i].createTextField("napis", getNextHighestDepth(), 3, 2, 80, 20);
this['bar'+i].napis.html = true;
this['bar'+i].napis.selectable = false;

this['bar'+i].napis.htmlText="<FONT FACE='Verdana' SIZE='11' COLOR='#000000'>"+napisy[i]+"</FONT>";
}
}

function close() {
for (i=1;i<=ilosc;i++) {
this['bar'+i].onEnterFrame = function() {
this._alpha -=10;
}
this['bar'+i].napis._visible=false;
}
}


//-------------------

function buttonStates(n) {

this[n].state = 0;

this[n].onPress = function() {
this.state = !this.state;
};

this[n].onRelease = function() {
if (this.state) {
open();
} else {
close();
}
};
}

this.buttonStates(_root.bar0._name);



As you can see above, all works fine but one thing. The negation this.state[n]=!this.state[n] causes, that when I launch open() at the program start, I can click item in menu (the hand shows up), but when I click main menu, and the want to rollover subitem in that menu, the hand is gone, even when I test it, launching open() twice, to check if something was wrong.

So at the end, something is wrong witch switch on/off function, especially with the negation, but what?

I used Flash 8 Professional, below is an attachement with the application. Be free to use it, like you want.

Maybe, you will find simpliest way of implement on/off and select functions.

I'm exhausted with my tiny little problem. Maybe you have an idea how to overcome or reroute this?
neo-n27 is offline   Reply With Quote
Old 10-18-2007, 04:53 PM   #4
neo-n27
inosmniac
 
Join Date: Oct 2007
Posts: 6
Send a message via Skype™ to neo-n27
Default Working example of my...

... and some example, I' ve created in F8 Professional.
Attached Files
File Type: zip drop down menu.zip (5.3 KB, 259 views)
neo-n27 is offline   Reply With Quote
Old 10-20-2007, 05:38 PM   #5
neo-n27
inosmniac
 
Join Date: Oct 2007
Posts: 6
Send a message via Skype™ to neo-n27
Default

Could you post here the attachement with your Flah animation? I'll try to solve it in 24h. C'ya.
neo-n27 is offline   Reply With Quote
Old 10-22-2007, 11:24 AM   #6
Alexus
Senior Member
 
Join Date: Dec 2006
Posts: 152
Default

Jackwrench, try this Open Source menu, rollOut event works properly
__________________
www.flashmenulabs.com - Flash Menus Creating Tool
Alexus is offline   Reply With Quote
Old 10-29-2007, 07:50 PM   #7
sam2
Registered User
 
Join Date: Oct 2007
Posts: 7
Default sub menu

Quote:
Originally Posted by atomic View Post
Try this...
how do i make a submenu with this drop down menu??
sam2 is offline   Reply With Quote
Old 10-29-2007, 08:41 PM   #8
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

You mean a submenu of one of the items in the drop menu?
atomic is offline   Reply With Quote
Old 10-29-2007, 10:24 PM   #9
sam2
Registered User
 
Join Date: Oct 2007
Posts: 7
Default

ya.
how do i do that?

Last edited by sam2; 10-29-2007 at 10:28 PM.
sam2 is offline   Reply With Quote
Old 11-19-2007, 03:29 PM   #10
skee
shreadmeister
 
skee's Avatar
 
Join Date: Jun 2002
Location: Sonoran Desert
Posts: 491
Default

Alexus,
I can't seem to get that flash menu from flashmenulabs you mentioned to work. I downloaded the whole zip, open up the .fla in Flash, try to preview movie and a blank screen comes up. I have all the components but I 2 errors

**Error** Scene=Scene 1, layer=actions, frame=1:Error opening include file frame1st.as: File not found.

**Error** Symbol=menu_item_prototype, layer=Layer 1, frame=1:Line 1: The class or interface 'CMenuItem' could not be loaded.

Total ActionScript Errors: 2 Reported Errors: 2

Both the CMenuItem and frame1st.as files are in the same folder. Any thoughts? Also, is there a version of that .fla that does not call out to external as files?
thanks,
Skee
__________________
HeavyBag
skee is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
drop down menu commands jreley ActionScript 2.0 2 10-29-2007 09:31 AM
Dynamic menu help mattzi ActionScript 2.0 5 11-05-2006 10:23 PM
Need help in XML drop down menu anindya ActionScript 2.0 2 06-21-2006 07:30 PM
Drop Down Menu... again padnpen ActionScript 1.0 (and below) 2 08-14-2003 10:06 AM
Mulitple Drop Down Menu problem Deathmaster213 Components 0 06-06-2003 01:03 AM


All times are GMT. The time now is 09:28 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.