4 Replies Latest reply on Nov 9, 2008 8:50 PM by luciewong

    remove Listener from emptyMovieClip?

    luciewong Level 1
      Hi,
      I have created several >emptyMovieClips< and have added RollOver + RollOut functions.

      How can I remove these functions.
      The EMCs should still remain, but no RollOver effects.

      Thank you for your help,
      regards,
      Luciewong
        • 1. Re: remove Listener from emptyMovieClip?
          luciewong Level 1
          any ideas??,please,
          - how can I remove the RollOver event from an emptyMovieClip??
          • 2. Re: remove Listener from emptyMovieClip?
            luciewong Level 1
            Hi,
            Please, I must solve this issue.
            I need to take the RollOver event away, because I want to enter text into the EMC's text fields on a next frame.
            I have some emptyMovieClips like this:>

            this.holderSub_mc.createEmptyMovieClip(["sub1a_mc"+a], (sub1adepth)+a);//
            this.holderSub_mc["sub1a_mc"+a].createTextField(["sub1a_txt"], (sub1adepth_txt)+a,sub1aX, sub1aY, sub1aW, sub1aH);
            this.holderSub_mc["sub1a_mc"+a]["sub1a_txt"].type = "dynamic";
            this.holderSub_mc["sub1a_mc"+a]["sub1a_txt"].selectable = false;
            this.holderSub_mc["sub1a_mc"+a]["sub1a_txt"].text = sub1_array[a];


            for(var a:Number = 0;a<sub1L;a++){
            this.holderSub_mc["sub1a_mc"+a].useHandCursor = true;//
            this.holderSub_mc["sub1a_mc"+a].onRollOver = function(){
            //>do something
            }
            this.holderSub_mc["sub1a_mc"+a].onRollOut = function(){
            //>do something
            }
            //

            But now, on a next Frame I need the Text field of the EMC >editable< and >selectable< and >type:”input”;
            Therefore I n e e d to take away the EMC’s RollOver effect.

            I tried many things, like:
            this.holderSub_mc["sub1a_mc"+a].useHandCursor = false;//
            this.holderSub_mc["sub1a_mc"+a].onRollOver = null;
            removeEventListener(this.holderSub_mc["sub1a_mc"+a],"onRollOver");//
            this.holderSub_mc["sub1a_mc"+a].removeListener("onRollOver");//

            But, still, nothing works, the EMCs have their RollOver and I cannot enter into their Text field.

            Thank you for your help.
            Luciewong
            • 3. Re: remove Listener from emptyMovieClip?
              rlc5611 Level 1
              Can you try:

              delete whateverpath.onRollOver;
              delete whateverpath.onRollOut;
              now change text type, etc.
              • 4. Re: remove Listener from emptyMovieClip?
                luciewong Level 1
                Thank you so much,rlc5611,
                "delete" did it - you have just solved a 2 days issue.
                have a nice day,
                Lucie