# StyleSheet Problem

**URL:** <https://forum.kirupa.com/t/stylesheet-problem/237298>\
**Category:** flash\
**Created:** [August 29, 2007, 3:45am UTC](https://forum.kirupa.com/t/stylesheet-problem/237298 "2007-08-29T03:45:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![twistedpixel](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@twistedpixel](https://forum.kirupa.com/u/twistedpixel)\
**Post date:** [August 29, 2007, 3:45am UTC](https://forum.kirupa.com/t/stylesheet-problem/237298/1 "2007-08-29T03:45:49Z")

</div>

Hi,

I have this code here in Flash where I am dynamically populating a text component…

```auto

var styles = new TextField.StyleSheet();
var css_url="efarmasi.css";
styles.load(css_url);
styles.onLoad = function(ok) {
  if (ok) {
    // If the style sheet loaded without error, 
    // then assign it to the text object, 
    // and assign the HTML text to the text field.
    disptext.styleSheet = styles;
 disptext.text = storyText;
  }
};

```

Now, in the actual text is in a

- This is the code for the CSS
