I'm using AS3 in an AS3 project (no flex) to create an instance of RemoteObject and use it to talk to the server
most things are working but not the best thing: having your java objects magically converted to their AS3 counterparts by use of the RemoteClass[...] annotation in your AS3 counterpart.
so, I put the same AS3 code into a script tag in a flex app (just the code, no mx components) and everything works
but, I put the same AS3 code into an AS3 project, everything works but typed java class to AS3 class conversion
any thoughts? can I just create a component out of the thing that works, and use that in my AS3 project?
I do have makeObjectsBindable set to true
the error I get is this:
Cannot convert type flex.messaging.io.amf.ASObject with remote type specified as 'null' to an instance of class ...
any help appreciated
Hi. Take a look at this blog posting.
Basically, you need to call registerClassAlias yourself rather than having the Flex compiler (mxmlc) do the magic for you.
The mxmlc compiler takes the RemoteClass metadata and creates a registerClassAlias call in a static init block in some actionscript it generates. This actionscript is then compiled into the swf that is your Flex application. If you are not using Flex then you are missing this step and need to write the code that mxmlc would have generated for you.
Hope that helps.
hey thanks for responding--
did, eventually, figure all that out