# Load CSS to ANY textfield in ALL levels

**URL:** <https://forum.kirupa.com/t/load-css-to-any-textfield-in-all-levels/313400>\
**Category:** flash\
**Created:** [August 28, 2010, 6:31pm UTC](https://forum.kirupa.com/t/load-css-to-any-textfield-in-all-levels/313400 "2010-08-28T18:31:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manare](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@Manare](https://forum.kirupa.com/u/Manare)\
**Post date:** [August 28, 2010, 6:31pm UTC](https://forum.kirupa.com/t/load-css-to-any-textfield-in-all-levels/313400/1 "2010-08-28T18:31:48Z")

</div>

Hi there!

I’m loading some CSS for my dynamic text textfields, but I have lots of MC’s containing many other MC’s which contain many textfields.  
I’m using this:

```auto
myCSS = new TextField.StyleSheet();
myCSS.load("styles.css");
myCSS.onLoad = function(success) {
        if (success) {
                MC1.myText.styleSheet = myCSS;
        }
};

```

but the main nuisance is the fact I need to apply this piece of code for every MC in the movie and every MC within an MC… and every textfield.

Isn’t there a way to apply this CSS just once, to ANY textfield in ALL levels of the project? (Just like when you load an external txt file with **LoadVars** )

I mean, I’d like to know if something like this could be done:  
_ **LoadtoAnylevel.ANDtoAnyTextfield**.styleSheet = myCSS;_

Thanks in advance for your help.  
Cheers,
