3 Replies Latest reply on Jan 29, 2007 10:30 PM by coldMiner

    SubMenu Class

    SymTsb Level 2
      Hey guys. Me again....

      I've written my class and have it properly adding the text with the buttons. I created the following class function to create my event handlers for each button. The problem I'm having is that no matter what button I am clicking on, they all try to load the file with the name of the last button. I need it to create individual handlers that load the proper file. button 1 should load one.txt and button 2 should load two.txt etc etc. Where am I going wrong?

        • 1. Re: SubMenu Class

          just to be sure that the problem is not the 0 index of the array, do you have a (mItems[0]+"_btn") in your target_mc ?
          If not, that is the problem. if yes, ill go further to help you ... just post again your answer.

          Hope it help!
          • 2. Re: SubMenu Class
            SymTsb Level 2
            butcho, there is a 0 item in the array. the array is sent and processed inside the constructor. I've been looking into the problem and it looks like I'm going to have to create a custom event handling system using listeners and broadcasts. As of right now, I'm a bit confused. Awaiting your response.
            • 3. Re: SubMenu Class
              coldMiner Level 1
              For loop always does this to "i"...
              This should do the trick: