# External text file in flash can't use css stylesheet

**URL:** <https://forum.kirupa.com/t/external-text-file-in-flash-cant-use-css-stylesheet/275305>\
**Category:** Uncategorized\
**Created:** [November 12, 2008, 8:46am UTC](https://forum.kirupa.com/t/external-text-file-in-flash-cant-use-css-stylesheet/275305 "2008-11-12T08:46:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![topfunniesCoUk](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@topfunniesCoUk](https://forum.kirupa.com/u/topfunniesCoUk)\
**Post date:** [November 12, 2008, 8:46am UTC](https://forum.kirupa.com/t/external-text-file-in-flash-cant-use-css-stylesheet/275305/1 "2008-11-12T08:46:27Z")

</div>

I am having trouble attaching an external stylesheet to a dynamic text file in flash.

Details:  
Instance name: my\_txt  
Variable name: storyText  
Flash 8 | ActionScript 2.0  
inside the text file: storyText=This is my is my text here…

Latest code that I am using:  
…  
function textLoader() {  
myData = new LoadVars();  
myData.onLoad = function() {  
my\_txt.html = true;  
my\_txt.htmlText = storyText;  
};  
myData.load(“about2.txt”);  
}

var myCSS = new TextField.StyleSheet();  
myCSS.load(“style\_t.css”);  
myCSS.onLoad = function() {  
my\_txt.styleSheet = myCSS;  
textLoader();  
};  
…

anyone know what the problem is?  
thanks,  
mark.
