1 Reply Latest reply on Jun 19, 2009 12:50 PM by kglad

    Text field not showing.

    LanzeL001

      Hi there.

       

      I have a script that draws a dot on a map and then removes an older text field popup if there and populates a new text field with some HTML text. below is the script. The individual parts work, but all I can get it to do is clear the pop up that was there. It will not write the new one. Any help would be great.

       

      //First we draw the dot

      this.createEmptyMovieClip("rectangle_mc", 10);
      rectangle_mc._x = 304;
      rectangle_mc._y = 372;
      with (rectangle_mc) {
             beginFill(0xFF0000, 100);
             moveTo(0, 0);
             lineTo(10, 0);
             lineTo(10, 10);
             lineTo(0, 10);
             lineTo(0, 0);
             endFill();
      }

       

      //Then we clear and write the new pop up.
      rectangle_mc.onRollOver = function(){
          PinTxt.removeTextField();
          this.createTextField("PinTxt",1,1,1,50,50);
          PinTxt.multiline = true;
          PinTxt.wordWrap = true;
          PinTxt.background = true;
          PinTxt.backgroundColor = 0xccccff;
          PinTxt.border = true;
          PinTxt.borderColor = 0x999999;
          PinTxt.html = true;
          PinTxt.htmlText = "<a href='00056.html'>Simon Fraser University</a><br /><a href='00061.html'>University of British Columbia, Project 1</a><br /><a href='00062.html'>University of British Columbia, Project 2</a><br /><a href='00063.html'>University of the Fraser Valley</a><br /><a href='00046.html'>Kwantlen Polytechnic University (KPU) - Surrey</a>";
      }

        • 1. Re: Text field not showing.
          kglad Adobe Community Professional & MVP

           

          //First we draw the dot

          this.createEmptyMovieClip("rectangle_mc", 10);
          rectangle_mc._x = 304;
          rectangle_mc._y = 372;
          with (rectangle_mc) {
                 beginFill(0xFF0000, 100);
                 moveTo(0, 0);
                 lineTo(10, 0);
                 lineTo(10, 10);
                 lineTo(0, 10);
                 lineTo(0, 0);
                 endFill();
          }

           

          //Then we clear and write the new pop up.
          rectangle_mc.onRollOver = function(){
              PinTxt.removeTextField();
              this.createTextField("PinTxt",1,1,1,50,50);

          with(this){
              PinTxt.multiline = true;
              PinTxt.wordWrap = true;
              PinTxt.background = true;
              PinTxt.backgroundColor = 0xccccff;
              PinTxt.border = true;
              PinTxt.borderColor = 0x999999;
              PinTxt.html = true;
              PinTxt.htmlText = "<a href='00056.html'>Simon Fraser University</a><br /><a href='00061.html'>University of British Columbia, Project 1</a><br /><a href='00062.html'>University of British Columbia, Project 2</a><br /><a href='00063.html'>University of the Fraser Valley</a><br /><a href='00046.html'>Kwantlen Polytechnic University (KPU) - Surrey</a>";

          }
          }