1 Reply Latest reply on Mar 10, 2009 6:47 PM by Ned Murphy

    Can't read RadioButton.data in function

    tikiri20
      Hi,
      there's a RadioButtons group (=Group3) and event listener appliead on it. The value of _root.choices3.a3.data is "a". The code is following:

      trace("DATA BEFORE" + _root.choices3.a3.data);

      var rbListener3 = newObject();
      rbListener3.click = function() {
      trace("I am inside.")
      trace("DATA INSIDE" + _root.choices3.a3.data);
      }
      _root.choices3.Group3.addEventListener("click", rbListener3);



      If I compile it, the output is:
      DATA BEFOREa
      I am inside.
      DATA INSIDE


      What's wrong? Why can't I read the value of _root.choices3.a3.data inside the function?
      Thanks for help.