1 Reply Latest reply on Dec 4, 2009 3:13 PM by Flex harUI

    cast an object to a sprite

    jciglesias@uci.cu

      I'm trying to do a cast ,, from an object to a Sprite, cuz a I need to use the function addchild to a  panel , but that function can't work with a parameter like an object, it's gotta be displayobject type, what and doing is this

       

                      var sprite:Sprite =  new Sprite;
                      sprite = (parametros.grafico as Sprite);
                      panel.rawChildren.addChild(sprite);

       

      the problem is that the sprite value is null,, somebody knows how to do that..