This content has been marked as final. Show 4 replies
I may be completely wrong here, but I thought the swc files were simply library files of MXML or AS scripting (among other minor assets) so the compilier could reference library files... I don't think the swc file can be used dynamically. I know that I have to re-compile my primary applications every time I change my external library files - thus they are literally compiled into the main applications...
I think what would be a more applicable solution is a "module" that compiles seperately and could be updated as required without updating the primary application. Modules work VERY well for read-only or "pull" from the database type applications (such as charting and reporting) where you don't necessarily need to interact with the primary application.
When you reference the "load file" you may mean a .swf file (which is the module extension)... swc is the library extension.
Thanks for the, clarification, can I do a similar trick with swf files. Detect the presence and load on the fly if available.
I'm looking at this has a plugin, one main master app and each custom chart as a plugin.
Short answer... yes...
As I don't know the server technology, report type, or any other information on what exactly you are trying to accomplish - the ability of flex as a module loader is only limited by your imagination - blood, sweat, and tears - and ability in coding.actionscript...
If the "reports" require printing - flex is very limited in it's printing capability and typically hands that off to the server - such as ColdFusion's pdf abilities... if it's simply read-only data that needs to be produced to the user and not printed - then the module can do whatever you tell it to do or produce (or a combination of both) - could be a flag in the database (or flags), could be if the data exists in the database, could be a number of ways of determining how and when to display the results..Module "a" could be loaded as x is the customer and Module "b" if y is the customer... etc.
Hope that helps.
Yes you can detect the presence of swf files in a directory and load them and use them.