They are being loaded twice so the second copy goes away. Are you saying
that the first copy goes away too?
It would be more efficient to not load them twice so see if you can figure
out why there are two loads.
Both the copies go away.. and I don't load them twice , only once through a loop and when i debug and see the for loop below is executed only once... Am I not doing it the right way? . I am failry new to Flex and I couldn't find why Flex loads it twice
This is how try to load them in the application...
// Load the stylesheet files
var styleSheetFileFullPath:String = STYLESHEET_FILE_BASE_PATH + (styleSheetFiles[index] as String);
eventDispatchers[index] = StyleManager.loadStyleDeclarations(styleSheetFileFullPath)
trace("loading: index" + index + " file:" + styleSheetFileFullPath);
// It doesn't matter whether the result is complete or error
as IEventDispatcher).addEventListener(StyleEvent.COMPLETE, styleSheetFileLoaded);
as IEventDispatcher).addEventListener(StyleEvent.ERROR, styleSheetFileFailed);
In the complete event I try to trace that the particular file has been loaded to see whether it has been loaded... But i don''t see it there...
1 person found this helpful
I think was you are seeing as the second load is an RSL. This is a know issue with the debug output. Try compiling your style swfs with -static-rsls=false.
Notice the size is the same of the "second" load of the style swf. It is the same for the three swfs:
The RSLs are unloaded by the Flash Player because they have already loaded.
Thanks for the response.. But I am still having the same issue . This is how I compile my style swfs..
mxmlc StyleSkin.css -static-rsls=false -compiler.optimize=true -compiler.context-root=/Web -compiler.services=..\config\app-config.xml -library-path+=..\Flex\libs,..\Flex\libs\frameworks\libs -output StyleSkin.swf
I see that they are being loaded twice again. I tried compiling all the modules and everything with -static-rsls=false. But I still see that the files are loaded twice and it is unloaded... All my swfs are loaded twice, I don't know why
../styles/StyleSkin_Fonts.swf - 58,293 bytes after decompression
../styles/Common.swf - 39,617 bytes after decompression
../styles/StyleSkin_Assets.swf - 183,482 bytes after decompression
../styles/StyleSkin.swf - 210,114 bytes after decompression
../styles/StyleSkin_Fonts.swf - 1,153,335 bytes after decompression
../styles/StyleSkin.swf - 1,153,335 bytes after decompression
../styles/Common.swf - 1,153,335 bytes after decompression
../styles/StyleSkin_Assets.swf - 1,153,335 bytes after decompression
[Unload SWF] /flex/com/marketlinx/mls/client/ui/styles/
Sorry, my bad on the last response. I meant to say -static-rsls=true.
Thanks for the reponse.. This worked
Could you please tell me how was this problem solved? I am also getting the same problem and I am unable
to fix it
I do not find code where I am loading the swf twice
but can see the log of [Unload swf]