Thanks for the quick response. I'm not sure how to verify that the swf is a style swf. Any suggestions would be greatly appreciated. By the way, is there some reason that running "mxmlc style1.css" would not produce a style swf?
Thank you --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Make sure it really is a style swf. > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of jamalwally > Sent: Tuesday, July 15, 2008 9:45 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Runtime CSS and "SWF is not a loadable module" > > > > Hello, > > I'm trying to implement runtime css in my flex application. I have > compiled my css file > into a swf with mxmlc > > mxmlc style1.css > > Then I load the resulting style1.swf on Application creationComplete: > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml > <http://www.adobe.com/2006/mxml> " layout="vertical" > creationComplete="StyleManager.loadStyleDeclarations('../assets/style1.s > wf', true, > true)"> > > But when I debug this in Flex Builder 3, I get an error (see below) > saying that my > style1.swf is not a loadable module. I looked around online and in this > forum and it seems > that this message is security-based, which is puzzling to me because all > files are local in > my example. I am not loading a style file from another domain. > > My directory structure (on OS X Leopard) is: > testRuntimeCss\ > assets\ > style1.css > style1.swf > src\ > testRuntimeCss.mxml > > I have tried this with the "Compile CSS to SWF" option both checked and > unchecked (right > click on style1.css). > > What gives? > > [SWF] Users:jbattat:Documents:Flex Builder 3:testRuntimeCss:bin- > debug:testRuntimeCss.swf - 582,620 bytes after decompression > [SWF] Users:jbattat:Documents:Flex Builder > 3:testRuntimeCss:assets:style1.swf - 11,294 > bytes after decompression > Error: Unable to load style(SWF is not a loadable module): > ../assets/style1.swf. > at > <anonymous>()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\styles\S > tyleManag > erImpl.as:858] > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at > ModuleInfoProxy/moduleEventHandler()[E:\dev\3.0.x\frameworks\projects\fr > amework\src > \mx\modules\ModuleManager.as:1027] > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at > ModuleInfo/initHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\ > mx\modules\ > ModuleManager.as:631] >