This may be just me or possibly a bug in Flex, I have a remote class and a local class and using AMFPHP the classes should map in Flex without a problem and it works... but only if I have a reference to the local class somewhere in the script block.
If I request an array of Employee objects they are returned as Employee objects from AMFPHP and mapped correctly as long as in the script block I have a reference to Employee even if its not used.
public var employee:Employee = new Employee
Remove this reference and the objects are mapped to object Object not object Employee - I'm I going crazy or is this strange behaviour from Flex, can anyone shed any light on why this might happen and how to stop it?
UPDATE: Think I have cracked it - its because there is no refrence so even with an import statment the compiler does not include the file and therefore it cannot map to that class. Now I just need to figure out a way to force the compiler to include the file...
Message was edited by: dataDash
The Employee class comes with code that registers it with the AMF conversion
code. Without the class definition, it will revert to Object because it
won't know how to map the fields in the AMF stream.