The 1000 FXG components would be available on the server, but the Flash app wouldn't contain them. The app would just load the ones the user wants.
I would make the effort of putting each graphic into its own MXML Module and load whatever is needed.
But then the size of the Flash app (SWF) will be quite large, right? (If I have hundreds of FXG graphics.)
1 person found this helpful
You put each graphic into a MXML Module (not MXML Component) which stays on the server and is loaded at runtime when you request it, as in:
// >>>>> Imports <<<<<
// >>>>> Variable Declarations <<<<<
private var urlLdl:URLLoader;
private var modInfo:IModuleInfo;
private var oneGraphicsModule:Object;
// >>>>> Methods <<<<<
private function moduleLoader( pathToModule:String ):void
// Loading one Module
modInfo = ModuleManager.getModule( pathToModule );
urlLdl = new URLLoader( );
urlLdl.dataFormat = URLLoaderDataFormat.BINARY;
urlLdl.addEventListener( Event.COMPLETE, bytesLoadedHandler );
urlLdl.load( new URLRequest( pathToModule ) );
private function bytesLoadedHandler( event:Event ):void
modInfo.addEventListener( ModuleEvent.READY, moduleLoadedHandler );
modInfo.load( null, null, event.target.data );
private function moduleLoadedHandler( event:ModuleEvent ):void
oneGraphicsModule = modInfo.factory.create();
// Do with the module what you need to . . .
So all of your graphics stay on the server, you "just" need to put each graphic or group of graphics into a MXML Module.
I haven't had a chance to try this out yet, so I can't mark it as "Correct answer", but I marked it as "Helpful" for now - I hope that's OK.