# CSS and loadVars

**URL:** <https://forum.kirupa.com/t/css-and-loadvars/83401>\
**Category:** Uncategorized\
**Created:** [March 18, 2005, 2:23pm UTC](https://forum.kirupa.com/t/css-and-loadvars/83401 "2005-03-18T14:23:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashtobbe](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@flashtobbe](https://forum.kirupa.com/u/flashtobbe)\
**Post date:** [March 18, 2005, 2:23pm UTC](https://forum.kirupa.com/t/css-and-loadvars/83401/1 "2005-03-18T14:23:57Z")

</div>

I have made a Flash movie which loads variables from a database through a php-script. Works fine, but then I wanted to attach a CSS-stylesheet and I can’t make it work. I have tried to use this tutorial ([[color=#000020]css\_in\_flash\_mx[/color]](http://www.actionscript.org/tutorials/beginner/css_in_flash/index.shtml)) and it works fine even with an external .txt but not when I load from my .php.  
How can I make my text use the stylesheet???

This is my code in flash:

import = new LoadVars();  
import.onLoad = function() {  
var i;  
myText.htmlText = “”;  
for (i=0; i\<5; i++) {  
myText.htmlText += +this[“title”+i]+" “+this[“date”+i]+”\<br\>";  
myText.htmlText += +this[“entry”+i]+"\<br\>";  
}  
myScrollbar.update();  
import.load(“entries.php”);  
}
