0 Replies Latest reply on Feb 27, 2007 6:02 AM by jeroencornelissen

    new Resize() on a Sprite object

      I'm making a resize function that has to resize an object that extends Sprite.

      But I keep ketting a type coercion error:
      TypeError: Error #1034: Type Coercion failed: cannot convert AS::Project@318ff89 to mx.core.IUIComponent.

      I've tried casting the Project object to an UIComponent or DisplayObject, but this also throws a TypeError.

      var resizeTarget:UIComponent = new UIComponent();
      resizeTarget = UIComponent(target.getChildAt(0));
      var myResize:Resize = new Resize(resizeTarget);

      So basically should I try avoiding the use of Sprites in Flex? Or are there solutions?