4 Replies Latest reply on Aug 22, 2008 11:37 AM by Gregory Lafrance

    Shape error in MXML script

    wyattbiker Level 1
      The attached MXML file gives the following error at the line this.addChild(square);

      TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Shape@5fc5301 to mx.core.IUIComponent.

      Now I know I can put the code in a seperate class package and instantiate the class from Sprite, but is there a way to fix this code to work from inside the Application MXML file?