CSSLoader
by Ruben
Today I made the last completion to my CSSLoader class, the class enables you to load CSS files into your flex application during runtime, a functionality Actionscript3.0 lacks. It's actually as easy as this:
var loader:CSSLoader = new CSSLoader(); loader.load("mycssfile.css", "nameToBeGiven", displayObj1, displayObj2);
..where the amount of DisplayObjects (to which the style will be applied automatically after loading has finished) is infinite. The style will also automatically be applied to the given DisplayObjects' their children (if any).
Obviously, the class comes with many more features (methods and events), which are all to be found in the docs.
Go check out the demo, and browse through the source and documentation.
Please leave a comment and tell me what you think..
Oh, and big thanks go out to Maikel for helping my out time after time again..
Comments (read older or newer, or show 35 trackbacks)
Trackbacks:
Thanks alot Scott, it’s currently 6.45 in the morning over here, so I’ll have a look at it when I actually wake up
Scott, among some other tweaks I made the modification you suggested, the new version of CSSLoader is now available for download.
[...] “The other day someone hit me up about a bug in my CSSLoader class, I fixed it along with some other minor faults and updated the online demo. Demo Source Documentation Noteworthy is that CSSLoader now also loads images for properties like backgroundImage.” [...] [...]
Ruben, Thanks for this. Exactly what I’ve been looking for. Do you have a license for this? Or do you consider this public domain?
Thanks Dan. I’m fine with whatever you’re using it for, as long as you’re not modifying the code without my approval (that includes keeping the headers in tact)..