3 Replies Latest reply on May 16, 2010 11:22 AM by kglad

    Set X Y cordinates

    Ron Colmen Level 2

      I need to make the "rcheck2_txt" rotate 180. With this script it does what I need. But currently the centre point is in the top-left corner of the dynamic text box. How do i change the X Y cordinates so the centre point is in the middle of the dynamic text box?

       

      rot_var.font = "Font1";
      _root.rot_var = 0;

      _root.glv_mc.rcheck2_txt.embedFonts = true;

      rot1_btn.onRelease = function() {  
      _root.glv_mc.rcheck2_txt +=180;
      }

        • 1. Re: Set X Y cordinates
          kglad Adobe Community Professional & MVP

          the center is always the center.  you want to change the  textfields "registration" point so your textfield rotates around its center instead of rotating around its upper left corner.

           

          you can't do that.   but you can make it appear that your textfield's registration point has changed:

           

          add your textfield to a movieclip.  ie, create a movieclip and add your textfield to that movieclip.  the textfield's registration point will be the movieclip's stage-center.  you want to center your textfield on the movieclip's stage.

           

          you can now rotate the movieclip and it will appear that your textfield is rotating around its center.

          • 2. Re: Set X Y cordinates
            Ron Colmen Level 2

            Thanks Kglad. That piece of information was helpfull indeed.

            • 3. Re: Set X Y cordinates
              kglad Adobe Community Professional & MVP

              you're welcome.