joshstrike
04-29-2008, 10:17 AM
Hey all, quick one here...
I generally use two .swf files for my sites, let's call them Initialize and Core. Initialize just reads external vars and runs a loads Core, then runs an init function on it (so users just get a blank instance if they load Core without loading Initialize).
Easy. And when I'm running things from Core, my root is Core, that's the application domain, and everything's cool. If Core has an item in the library called Something that's exported for AS, then I can call new Something() without a problem.
The only time this doesn't work is for components. For some reason beyond my understanding, the components that are run are the ones that are in the Initialize library, and they have to be there. This sucks, because the components use up something like 100k that there's no reason I'd want to spend time loading before Initialize launches.
I'm not placing anything on the stage, I'm just saying, new ScrollPane() or whatever. How can a new ScrollPane be drawn from the Initialize library, even if ScrollPane is in the Core library as well, when a new Something is drawn from the Core library, even if it's in the Initialize library? Something doesn't add up...
Thanks for any help,
Josh
I generally use two .swf files for my sites, let's call them Initialize and Core. Initialize just reads external vars and runs a loads Core, then runs an init function on it (so users just get a blank instance if they load Core without loading Initialize).
Easy. And when I'm running things from Core, my root is Core, that's the application domain, and everything's cool. If Core has an item in the library called Something that's exported for AS, then I can call new Something() without a problem.
The only time this doesn't work is for components. For some reason beyond my understanding, the components that are run are the ones that are in the Initialize library, and they have to be there. This sucks, because the components use up something like 100k that there's no reason I'd want to spend time loading before Initialize launches.
I'm not placing anything on the stage, I'm just saying, new ScrollPane() or whatever. How can a new ScrollPane be drawn from the Initialize library, even if ScrollPane is in the Core library as well, when a new Something is drawn from the Core library, even if it's in the Initialize library? Something doesn't add up...
Thanks for any help,
Josh