Ruben’s blog

Ruben Swieringa on Actionscript and a whole lot of other stuff..

Month: February, 2007

CSSLoader

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 [...]

E4X and case sensitivity

Although this may very well be slightly obvious, when using E4X in Actionscript3.0, differences in case between opening and closing XML tags can really have you running around the place searching for bugs in your code, while the bug is in reality in your XML. It had me running to say the least..
So next time [...]

No runtime CSS what?

You cannot load an uncompiled CSS file into your Flex application at run time. You must compile it into a SWF file before loading it.
Loading style sheets at runtime (Macromedia Flex LiveDocs)
You can’t load pure CSS files with actionscript3.0 during runtime unless the stylesheet is compiled into an SWF, what’s up with that? I can [...]

Notes on E4X in Actionscript3.0

Last tuesday I was working on the actionscript3.0 version of my calendar class. At a certain point I found myself in a situation where I needed to get data from a XML file and query it for events per date. This brought up a good excuse to get a bit more familiar with the new [...]

First post

So here we are. From now on this will be home to some of my ramblings regarding (mainly) web-development. I’m Ruben, this is my blog.