5 Replies Latest reply on Sep 28, 2011 4:33 PM by kglad

    Before adding a new TF, remove any TF containing  "Type Here"

    Ron Colmen Level 2

      Code Below: Each time a button is clicked the code creates a new TF.


      By mistake if a user clicks the newTF_btn button more than once, How do I delete the previous TF? Basically I need to delete any TF which is not in use. (not in use = TF with "Type Here")







      function createTF(x:Number,y:Number,s:String):Void{

          if (tfNum_mc.tf.text == "Type Here") {

                      this._parent.removeMovieClip(); // not working


      var tfNum_mc:MovieClip = tl.attachMovie("tfID","tfNum_mc_",tl.getNextHighestDepth());



          tfNum_mc.tf.background = true;

          tfNum_mc.tf.backgroundColor = 0xffffff;

          tfNum_mc.tf.text="Type Here";




      Message was edited by: Ron Colmen