# Dynamic CSS styling

**URL:** <https://forum.kirupa.com/t/dynamic-css-styling/207711>\
**Category:** flash\
**Created:** [November 20, 2006, 9:11pm UTC](https://forum.kirupa.com/t/dynamic-css-styling/207711 "2006-11-20T21:11:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jt\_01](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@Jt\_01](https://forum.kirupa.com/u/Jt_01)\
**Post date:** [November 20, 2006, 9:11pm UTC](https://forum.kirupa.com/t/dynamic-css-styling/207711/1 "2006-11-20T21:11:10Z")

</div>

Basically I’m trying to format some dynamically loaded text with CSS from a database via asp, I know that the asp works fine as it loads in, its just applying a style to the loaded text that doesn’t work.

This is a modified version from the Kirupa tutorial, but I cannot get it to work after many, many hours. Help!!!

```auto
var MediaAccess = new TextField.StyleSheet();
MediaAccess.load ("media.css");
MediaAccess.onLoad = function (loaded)
{
    var info:TextField = _root.createTextField ("info", 4, 100, 50, 200, 30);
    info.border = true;
    info.html = true;
    if (loaded)
    {
    info.styleSheet = MediaAccess;
    newsData = new LoadVars();
 newsData.load("getdetails.asp?Record=0");
 newsData.onLoad = function (success){
  if (success == true){
  info.htmlText = unescape(this.Name);
 }
 }
 } else {
    info.text = "uh this is not working";
    }
};

```
