Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
xiva #1
Can CSS file load dynamically?
We have a large application.
In our design, we make the whole application as one mxml application, and the
other modules are the mxml components to be load into the mxml application.
And, we have a lot of styles, we put them in serveral .CSS files, one file is
used for one module.
Now since we have only one mxml application, and in flex, .CSS can be only
included in mxml application but not mxml components, we have to include all
these css file in the largest application.
We use tag as <mx:Style source="../theme/XXX.css"/>
It seems the size of the CSS will be counted into the compiled as file, so it
often exceeds the size limitation of 32K(We have CSS files total size more than
12K, and this size will increase as we develop more and more modules).
Is there any approach to load the css file dynamically to avoid the exceed
size limitation?
xiva Guest
-
Load Image Dynamically
Hi, brothers :) I'm rather novice in this area. I mean web programming and control building and though. I create UserControl: public class... -
Dynamically load of 3d models
Hi! I'm about to create a larger realtime 3d project. I havn't completely decided on which technology to use, but my first choice is director.... -
Best way to dynamically load jpegs?
I am new to Flash and actionscript and just getting my feet wet learning how to put the pieces together. I would like to dynamically load series of... -
Dynamically load an ASP Page
I'm pretty new to ASP.Net (server side) Suppose that I have an instance of an ASP Page class, and I want the client's web browser to load it. I... -
How to dynamically load new image to cast member from file..
I'm trying to load a new image from a file into an existing cast member during run-time and I'm sure not sure how to do this. Can you help? ... -
ntsiii #2
Re: Can CSS file load dynamically?
Per Gordon Smith of Macromedia:
There is no CSS parser in the Flash Player or in the Flex framework... only in
the MXML compiler. So you can't load a CSS file at runtime unless you want to
parse it yourself.
But if you save your user profiles -- including their customized styles -- as
XML files on the server, you could download them, parse them, and set various
styles, including global styles that affect the entire application, using a
fairly small amount of ActionScript.
- Gordon
ntsiii Guest
-
ntsiii #3
Re: Can CSS file load dynamically?
Also, the 32k limit is not what you think. See this link:
[url]http://www.cflex.net/showfaq.cfm?ChannelID=1&faqType=#Question365[/url]
Tracy
ntsiii Guest
-
xiva #4
Re: Can CSS file load dynamically?
Thanks for the help from Gordon & Tracy.
One more question: How can I know the size of the compiled file?
But if you save your user profiles -- including their customized styles -- as
XML files on the server, you could download them, parse them, and set various
styles, including global styles that affect the entire application, using a
fairly small amount of ActionScript.
Sorry I can't catch the meaning of the above words well...
1. What is 'user profiles'?
2. How can I save them as XML files?
xiva Guest
-
ntsiii #5
Re: Can CSS file load dynamically?
Gordon was replying to another persons need for user configurable styles. What
that means to you is that instead of dynamic css, store the style
specifications in an xml file, then on initialize, use the xml data to know how
to use setStyle().
What "compiled file" do you want to know the size of?
Tracy
ntsiii Guest
-
xiva #6
Re: Can CSS file load dynamically?
Originally posted by: ntsiii
Gordon was replying to another persons need for user configurable styles.
What that means to you is that instead of dynamic css, store the style
specifications in an xml file, then on initialize, use the xml data to know how
to use setStyle().
What "compiled file" do you want to know the size of?
Tracy
Hi, Tracy, firstly I don't know how to load styles in XML format, and how to
parse them. I can't image how to perform this task //shy
I mean, the 32k limitation is not for the source file, but for the generated
files.How can I know how large the generated file is?If I do some modifications
in the source file, can it reduce the generated file's size effectively?
xiva Guest



Reply With Quote

