3 Replies Latest reply on Aug 20, 2006 4:16 PM by aniebel

    If statements within component listener

    Pe_ka Level 1
      Hi,

      I am going to use two radiobuttons and have a selection using if -statement. When i test this script both the trace -commands are executet. Can anyone please tell me what i am missing. I want only one of the if-statements to execute when clicking the radiobuttons.

      The script i am testing.

      flashistListener = new Object();
      flashistListener.click = function (evt){
      //slask = evt.target.selection.data;
      //trace(slask);
      if (rb_default.selected = true) {
      trace(">>>value<<<");
      }
      if (rb_no_default.selected = true) {
      trace(">>>novalue<<<");
      }

      }
      radioGroup.addEventListener("click", flashistListener);