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

    get TextField backgroundColor returns number?

    luciewong Level 1


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

      my code:



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

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


                                        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;



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

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



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


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


      Thank you for your help