This content has been marked as final. Show 3 replies
You make containers in different files simply by creating your own MXML components based on whatever kind of framework container you're interested in (e.g. VBox). As to making them visible or not, does each one occupy the same space on screen, so you just want to swap out the visible container? If so, then ViewStack is for you, just check the API and Developing Applications in Adobe Flex docs.
I already have mine in separate files, but how can I make those components load as separate files at run time? To keep file size down for example.
Oh I see. You want to look into the mx.modules package as well as RSLs. The Flex docs team published a newer version of the modules doc here:
Not sure if it's made it in to the official docs or not. And you can read about RSLs in the Flex/AS/Flash Player documentation.
But let me pass on some advice that I've learned to respect: Don't do performance tuning until you know where the pinch points are. Developing with modules (or RSLs) can improve your application startup time, but there are tradeoffs, not the least of which is that you have additional code complexity. You're also making a decision that gets progressively harder to un-make as you go along. So unless you already have a real problem with SWF download time, I'd suggest you hold off on refactoring your app into modules/RSLs until you know you have a problem that doing so will solve.
Anyway, just my $0.02