6 Replies Latest reply on Oct 24, 2011 10:36 AM by luciewong

    get TextField backgroundColor returns number?

    luciewong Level 1

      Hi,

      I have a textfield on stage and on RollOver I want to get it's background color?

      my code:

       

      this.createEmptyMovieClip("holderSub_mc",mydepth+21029);

                                        this.holderSub_mc.createEmptyMovieClip(["sub1a_mc"], mydepth+15);

                                        this.holderSub_mc["sub1a_mc"].createTextField(["sub1a_txt"], mydepth+17,sub1aX, sub1aY, sub1aW, sub1aH);

                                        //xxx

                                        this.holderSub_mc["sub1a_mc"]["sub1a_txt"].type = "dynamic";

                                        this.holderSub_mc["sub1a_mc"]["sub1a_txt"].selectable = false;

                                        this.holderSub_mc["sub1a_mc"]["sub1a_txt"].border = true;

                                        this.holderSub_mc["sub1a_mc"]["sub1a_txt"].borderColor = sub1afrColor;//

                                        this.holderSub_mc["sub1a_mc"]["sub1a_txt"].background = true;

                                        this.holderSub_mc["sub1a_mc"]["sub1a_txt"].backgroundColor = sub1afillColor;

       

      //xxxxx

      holderSub_mc["sub1a_mc"].onRollOver = function(){

      test10 = (this["sub1a_txt"].backgroundColor).toString();

      }

       

      it will return a number like 64234556<!!!!!

      //xxxx

      How can I convert this number and get a color in proper format like >0xFF0000< for ex?

       

      Thank you for your help

      regards,

      Luciewong