3 Replies Latest reply on Jun 11, 2008 2:01 PM by ooba

    Really I need help

    ooba Level 1
      Rather than post all my code i'm making this as generic as I can.

      The realm.
      Using a custom class.
      The issue is that I do not have scope to Class variables when dealing with the event handler functions i have created inside of a function. How do I not lose scope of the variables?
      So, in the code below i am trying to just show the value of "_uid" but the value is always undefined. This is a scop issue.

      How do i resolve this?
        • 1. Re: Really I need help
          Rothrock Level 5
          Sorry it looks like I might have steered you in the wrong direction on this one. Looks like you don't need the Delegate after all. If I understand what you are trying to do correctly it looks like what I've attached should work. Remember the instance of your class is also a perfectly good object itself so you don't need another object to attach the event handlers to.

          It is a little messy to my eye because they are events of the movieclip loader but they look like methods of your loader class. But it works and is easy.
          • 2. Re: Really I need help
            ooba Level 1
            Rothrock thank you for your quick response. I am editing my class now with the update on how i am implementing the event handler methods. I will post the status in a bit.
            • 3. Re: Really I need help
              ooba Level 1
              Excellent. I removed all usage of the Delegate and moved my event methods out of the parenting method and key thing _mcl.addListener(this);

              Everything is now working. You were a huge help as I was on the wrong path. Thank you Rothrock.