I'm looking for ways to load MXML code at runtime and compile it at runtime within Flex application (web or Air). The MXML code may exist on disk, in memory, or be created by the actively running Flex application. Upon a user event, like a button click, the MXML code (and possibly associated .as files) get compiled and are now usable by the application. Is this possible?
Not unless you want to write your own MXML and ActionScript compiler in ActionScript. You could, however, call out to a Java server and call mxmlc, since that's written in Java.
But could you show me an example on how to implement this? It is important for me too.