I have a Flex mobile app for iOS and Android. For performance reasons, I would like to move some of my download code into a Worker. I have about 20 Java classes which are being deserialized into ActionScript after making a RemoteObject call to download the data from a server. Each of those classes has a [RemoteClass(alias="com.mycompany.MyClass")]
metadata tag on it. When in my main application, this all works great. In the Worker however, it does not have the class aliases registered for each of those classes. This means that when I get the data from the server, it is all generic Object
classes instead of my own custom ActionScript classes. I was able to process the data correctly, only after manually re-registering those class aliases for all 20 classes within the Worker using registerClassAlias("com.mycompany.MyClass", MyClass);
I don't like that I have to maintain the aliases in two different places now. Is there any way to maintain the class aliases between my main swf and my Worker?