Is this possible ? If yes how ?
Otherwise what’s the alternatives ?
By dynamically I mean using
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
loader.load(new URLRequest("MySWF.swf"));
A SWF is not a class by itself, more like a collection of classes and other things (like images or audio bytes) all archived and ready to use. You can’t have a constructor for a SWF. However, what you can do, is loading a SWF and then, after the loading is complete, you can instantiate a class from that SWF and pass whatever arguments you want to it’s constructor.
Also, it’s possible to send parameters to the SWF and then process them as flashvars inside the swf, but that’s no constructor of course 🙂
And then you can get them like this: