A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: [MX] Dude, where's my menu button onRelease response?

  1. #1
    Member
    Join Date
    Jul 2006
    Posts
    95

    [MX] Dude, where's my menu button onRelease response?

    Hey all. I'm going bonkers with this problem! I created a drop-down menu movie clip. Within it are multiple buttons which change their alpha values. I'm having an impossible time of getting the buttons to respond to an onRelease from the maintimeline.

    for instance:

    stop();
    _root.menu_mc.print_btn.onRelease = function(){
    gotoAndStop("print1");
    }
    _root.menu_mc.illustration_btn.onRelease = function(){
    gotoAndStop("illustration1");
    }

    I can't place any code directly on the buttons because later in the timeline the actionscript needs to change for the same buttons:

    stop();
    _root.menu_mc.print_btn.onRelease = function(){
    gotoAndStop("print2");
    }
    _root.menu_mc.illustration_btn.onRelease = function(){
    gotoAndStop("illustration2");
    }

    I don't get it. I did something similar with buttons that didn't have multiple instances and everything worked fine. I can create an invisible button, place it over the animated button and get the onRelease to work, however, since the buttons are rollovers, I loose the animation with the invisible button covering them up. Why can't i target multiple instances of the same button in a movieclip?

    ANY info is greatly appreciated! This is making me crazy!
    Attached Files Attached Files

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