Randomizing CSS/Calling a Background Image

What I’m looking to do is randomize the CSS, but I’d also like to attach a background image to my css files so that I can make the site a tad more dynamic. I read the CSS tutorial on Kirupa’s Site here.

I’d also like to use externally loaded text, so I’m also not sure how I’d go about that, or if any of this is possible. Thanks for any help in advance.

You could write a function that comes up with a random integer inside a specific range of numbers. Let’s say you have 10 backgrounds, you could name them mcBackground1, mcBackGround2, etc and then dynamically attach the interger to the ‘mcBackground’. Say if your random number goes into a var (nRandomBackgroundNumber), you could have flash show:
“mcBackground” + nRandomBackgroundNumber;

If you need more specific help on code please let me know :slight_smile: If this is what you meant…

I see what you’re saying, but I think I’m not being clear in what I’m trying to do. I am attempting to load a random css file which would have a background image attached to it (through the css), but I want the background image to appear within a specific part of my flash file, not my html. I am not sure if that is possible to do in either instance. I would assume randomizing the css would not be much trouble, but attaching the background image to that and slapping it into an empty mc would be the difficult/not possible part.