# Help! How to access loaded Stylesheet from Main Class

**URL:** https://forum.kirupa.com/t/help-how-to-access-loaded-stylesheet-from-main-class/277949
**Category:** flash
**Created:** [December 19, 2008, 6:11am UTC](https://forum.kirupa.com/t/help-how-to-access-loaded-stylesheet-from-main-class/277949 "2008-12-19T06:11:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dougl](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@dougl](https://forum.kirupa.com/u/dougl)
#### Post date: [December 19, 2008, 6:11am UTC](https://forum.kirupa.com/t/help-how-to-access-loaded-stylesheet-from-main-class/277949/1 "2008-12-19T06:11:13Z")

</div>

I have a CSSLoader.as class that loads an external css file into a StyleSheet.  
I am importing and creating an instance of CSSLoader inside Master.  
\_cssLoader = new CSSLoader(flashStyles.css);

Inside Master,  
\_loadedStyles = \_cssLoader.getStyleSheet;  
\_loadedStyles = "+\_loadedStyles.styleNames); outputs the correct css styles.

When the StyleSheet is assigned to a textField in Master Class  
textField.styleSheet = \_loadedStyles;  
textField.htmlText = “\<span class=‘header’\>Page head goes here\</span\>”;  
the script runs without errors but no text is output.

In css, I’m using the embedded font name:  
.head {font-family: “Trebuchet MS Bold”;}

Thanks for your help.
