I know it is possible to instantiate a class at runtime, but one always
needs to put in a concrete piece of code that forces the compiler to
actually add the class to the swf. I am currently looking into using
this technique to gain flexibility in an application, but the fact that
I will
If you want to add a class in the future, you will definitely have to
recompile, because flash doesn't compile at runtime as far as I know.
But I have also looked for a way to simply import classes without also
having a var defined. It's not too big a deal, but it's an interesting
topic.
One way to do this is to compile the class into a swf that you load.
Essentially you are creating modules or dlls. You just have to handle
loading them yourself. I have been using the technique for a while on a
project and it works great.
Steve
On Tue, Oct 28, 2008 at 12:13 AM, Jiri Heitlager
There is a way to do it - rather than update your code with a
reference, you can force the compiler to include it by using the
compiler option:
-includes Class [Class]
e.g. mxmlc Main.as -output Main.swf -includes com.pack.MyClass
com.pack.MyOtherClass
Obviously you still need to recompile -
4 matches
Mail list logo