A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: trouble with drop down menu

  1. #1
    Member
    Join Date
    Oct 2000
    Posts
    70

    trouble with drop down menu

    Anyone help?

    My drop down menu works fine except when you roll over two buttons or more quickly. Then two or more menus drop down and stay there?

    Any ideas as how to prevent this?

    Thanks


    www.signandlight.com

  2. #2
    Member
    Join Date
    May 2003
    Posts
    72

    hi,

    i need to see the fla in order to understand the problem,

    but for a quick way try to disable the other buttons
    when you roll over on a button, and enable them when you
    RollOut from it.

    for example if i have 2 buttons, one i call but1, and the second but2 then
    i rollover but 1 then i'll put the next syntax:

    on(RollOver){but2.Enabled=false;}
    on(RollOut){but2.Enabled=true;}

    hope you understand,
    regards
    piny.
    expect the unexpected.
    that's what mx is all
    about.

  3. #3
    Member
    Join Date
    Oct 2000
    Posts
    70
    Thanks...Imnot sure if that would work with the code I used. here is a link to the .fla

    www.signandlight.com/menu/menu2.fla

    Thanks for your help

    Brian

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Just do it according to this example...
    Attached Files Attached Files

  5. #5
    Member
    Join Date
    Oct 2000
    Posts
    70
    thanks!

  6. #6
    Member
    Join Date
    Oct 2000
    Posts
    70
    Thanks for that code...however im having problems with it. I would like it to disapear on the click of the buttons? And the main button at the top which is text based when put inside the MC its hit state seems to not be working. IE the menu will not roll down unless its on the text!.

    I really like the way you have done the menu. It saves a lot of messing about with code compared to how I have done mine.

    However I was wondering if there is any code I can add to mine to make it work right? Or fix the above?

    I just want to get this job finished!!!

    Thanks again I really appreciate yout time

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Just draw a rectangular shape in the hit state, covering the whole area of your text, and that will become the new hit area.

    As for it disappearing on a click of the buttons, give the instance name of menu to the menu movie clip, and on your buttons' scripts, add the following along with your other actions...

    on (release) {
    _root.menu.gotoAndStop(1);
    // other actions
    }

  8. #8
    Member
    Join Date
    Oct 2000
    Posts
    70
    Thanks...

    Ive put the button inside the MC where as before it was outside and controlled the MC from there. However when I put it inside with the new code it works.. However the hit state that activates the new code is much more sensitive to the text. Ihave redrawn it but its still sensitive?

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Attach your .fla!

  10. #10
    Member
    Join Date
    Oct 2000
    Posts
    70
    here it is as you can see the hit state still works for the button but it is really sensitive to the actual dropdown!
    Attached Files Attached Files

  11. #11
    Member
    Join Date
    Oct 2000
    Posts
    70
    Thanks for your help once again..I got it working. It seems that a hit state within a button doesn't act as ahit state for the whole movie clip. I created another "hit state",on the bottomlayer of the mc. I then removed the button from inside the MC and turned the aplha on the MC hit state to zero. This means I can put it over the original button that tweens in on the menu.

    However I still haven't got the menu to disapear when the button inside the dropdown are clicked? I tried doing a _root.menu2.gotoAndStop(1)but it didn't work?

    I'll play around with it for a while..

    Many thanks

  12. #12
    Senior Member
    Join Date
    Aug 2002
    Posts
    111

    _root.menu2

    that working all depends on if menu2 is an instace name for a menu u should know that though,but

    PHP Code:
    on (release) {
    _root.menu.gotoAndStop(1);
    // other actions

    will work.of course as oldnewbie said menu is an instace name af on of ur menu button.....

    i got a question for u.ur submenu suttons are inside the main menu button rite so here so like this

    _root.menu.submenu

    cuz if so i belive u can also us

    PHP Code:
    on (release) {
    _parent.gotoAndStop(1);
    // other actions

    but i may be rong i dont know

  13. #13
    Member
    Join Date
    Oct 2000
    Posts
    70
    this is getting confusing now!

    Some of the buttons are working. And yes the instance name is menu2. Under the signage projects craggs works. It disappears when you click on the button as it loads the swf. It had the code as above attached to it On(release)_root.menu2.gotoAndStop(1).

    However Paramount oxford is also working and can't see any added code on it?

    Star has the code but doesn't work so does EDC?

    Whats going on here ?

    link to fla

    www.signandlight.com/menu/menu3.fla

    Also have a problem with director mc which is a sub menu of management team in under "The company" button. the menu disappears leaving the submenu on its own.......:-(
    Last edited by trancec; 05-30-2003 at 01:53 PM.

  14. #14
    Member
    Join Date
    Oct 2000
    Posts
    70
    Thanks everybody Ive solved the problem!!!

  15. #15
    Senior Member
    Join Date
    Aug 2002
    Posts
    111
    np

  16. #16
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Good work Fite_CLUB, he couldn't done it without you!

  17. #17
    Member
    Join Date
    Oct 2000
    Posts
    70
    Yes thanks everybody for your help I have learned a lot from this thread and your experience and couldn'thave done it without your help.

    I also had a problem with the the tweening of the drop down menu. It had two keyframes I was attaching the code to the wrong key frame ......DOH!




  18. #18
    Senior Member
    Join Date
    Aug 2002
    Posts
    111
    im sure i helped him i did like .09% oh the help hah
    the important thing is it worked

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center