Hi Thierry,
I've finally had the chance to try to repro the library
project issue you had and it works fine for me.
1. I created a simple library project with one class in it,
Foo.as, that has RemoteClass metadata:
package
{
[RemoteClass(alias="com.fake.Foo")]
public class Foo
{
}
}
2. I made sure this class was selected to be included in the
generated swc (Properties > Flex Library Build Path, Classes
tab) and I compiled to generate the swc.
3. I created another simple non-library project and added
"-keep" to the compiler command line arguments (Properties >
Flex Compiler > Additional compiler arguments), and added the
generated swc from the first project (Properties > Flex Build
Path, Libary path tab > Add SWC).
4. Here's the simple mxml app:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"creationComplete="initApp()">
<mx:Script>
<![CDATA[
import Foo;
private function initApp():void
{
var f:Foo = new Foo();
}
]]>
</mx:Script>
</mx:Application>
5. And here's the code-gen'ed line in
_<appname>_FlexInit-generated.as that corresponds to my
RemoteClass metadata:
flash.net.registerClassAlias("com.fake.Foo", Foo);
So in this simple scenario everything worked as expected. You
may want to try refreshing your projects, re'adding the swc, etc.
to try to identify why this was failing for you.
Best,
Seth