6 Replies Latest reply on Sep 24, 2009 11:46 AM by ScottCanada

    How to assign a packaged class into a property of Object in MXML

    ScottCanada

      There is a public class property defined in my ClassA such as the following statement:

      public var class1:Class = null;

       

      I would like to use mxml to contain this class object. It works fine in the following define when our classes were not packaged.

      <ClassC xmlns="*">

      <ClassA class1="ClassB" />

      </ClassC>

       

      It would be not compiled after packaging them for error "Access of undefined property ClassB" even I changed the code above into:

      <ClassC xmlns="namespace">

      <ClassA class1="ClassB" />

      </ClassC>

       

      or

       

      <ns1:ClassC xmlns:ns1="namespace*">

      <ns1:ClassA class1="ClassB" />

      </ns1:ClassC>

       

      or

       

      <ns1:ClassC xmlns:ns1="namespace*">

      <ns1:ClassA class1="ns1:ClassB" />

      </ns1:ClassC>

       

       

      Note: all classes have been defined in namespace

       

      Any suggestion? Thanks