4 Replies Latest reply on Jul 19, 2011 2:43 PM by s_davies

    addChild doesn't work in flex....

    chriswillis100 Level 1



      When i create a display object then do: addChild(display_object) in the <fx:script> part of an mxml file,  adobe air brings up an error message:


      Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one.


      And i've tried using addElement and i get this:



      Implicit coercion of a value of type flash.display:Shape to an unrelated type mx.core:IVisualElement.


      Any ideas?