1 Reply Latest reply on Feb 16, 2010 7:44 AM by Gregory Lafrance

    displayobject coloring

    venkateshk Level 1

      I have a HBox with id as 'container' in that i have multiple boxes

      I have given a name to each Box

      I want to get the child by name and I want to add the color to that child

      var disp:DisplayObject = container.getChildByName(boxname);

      here getChildByName() returns DisplayObject

      please tell me how to add the color to that child which is now in 'disp'

        • 1. Re: displayobject coloring
          Gregory Lafrance Level 6

          var disp:Box = container.getChildByName(boxname) as Box;

          disp.graphics.beginFill(0x00FF00);

          etc.

           

          If this post answers your question or helps, please mark it as such.


          Greg Lafrance - Flex 2 and 3 ACE certified

          www.ChikaraDev.com

          Flex / AIR Development, Training, and Support Services