header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
amutha
Points:400
Posts:0
Answered

7/21/2010 12:08:53 AM

Title: Theme


i have 2 css file for my application how can i change the css file while clicking the theme name.



1
Veer
Points: 480
Posts:0
Accepted Answer
7/21/2010 2:07:29 AM



Hi,

Create two or more individual css, compile it, load at runtime.
StyleManager.loadStyleDeclarations("style1.swf");
StyleManager.loadStyleDeclarations("style2.swf");

Check adobe livedocs
http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html

Regards,
Virat Patel

2
amutha
Points: 400
Posts:0
7/21/2010 3:01:34 AM



i want to load my file style.css and style1.css file format not a swf how can i do it? can anyone please help me


3
Justin
Points: 600
Posts:0
7/21/2010 3:47:32 AM



Use it like this
StyleManager.loadStyleDeclarations("style1.css");

why don't you compile your css to swf , In flex right click on your css file in file explorer and select "Compile as swf" option. It compresses the file for faster loading of dynamic stylesheet. You have to select this option once only after that flex will automatically compile it for you on saving css file.

4
Veer
Points: 480
Posts:0
7/21/2010 4:31:55 AM



Hi Justin,

Yes, exactly that what i mention in my answer, create two different SWF from CSS
and load as per requirement.

Regards,
Virat Patel

5
amutha
Points: 400
Posts:0
7/22/2010 12:20:57 AM



Thanks for all. i created 2 swf from my css.its working well but

StyleManager.loadStyleDeclarations("style1.css"); this is not work justin

StyleManager.loadStyleDeclarations("style2.swf"); this is only working.


Thanks.

6
Veer
Points: 480
Posts:0
7/22/2010 1:14:56 AM



hey...

use style1.swf instead of style1.css ....

Regards,
Virat Patel


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 0+4 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions