[html5][swf] cl is not a constructor when calling Type.createInstance

Hello,

I have generated a class from a FLA (using OpenFL plugin).

I can use it when I call it explicitly:

var asset:MovieClip = new HomeAsset();

But when I call it dynamically:

var asset:MovieClip = cast Type.createInstance(Type.resolveClass("HomeAsset"), []);

…I have the following error (error on html5 target, flash is working):

Uncaught TypeError: cl is not a constructor

I need to use Type.createInstance because my app is configured in a xml.

Note that writing this works in html5:

var d:HomeAsset;
var asset:MovieClip = cast Type.createInstance(Type.resolveClass(“HomeAsset”), []);

So is there a way to make it works without writing manually a reference to the class?

Thanks