# How to make Flash use CSS?

**URL:** <https://forum.kirupa.com/t/how-to-make-flash-use-css/238707>\
**Category:** flash\
**Created:** [September 14, 2007, 2:46am UTC](https://forum.kirupa.com/t/how-to-make-flash-use-css/238707 "2007-09-14T02:46:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyrreny](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@kyrreny](https://forum.kirupa.com/u/kyrreny)\
**Post date:** [September 14, 2007, 2:46am UTC](https://forum.kirupa.com/t/how-to-make-flash-use-css/238707/1 "2007-09-14T02:46:58Z")

</div>

Hello!

I’m trying to get Flash to use CSS to display HTML texts. The body text should be Kroeger 05\_56 (normal) and the link text should be Kroeger 05\_66 (bold). It’s at the bottom of:

[http://naoshige.probsd.net/work/pimpin](http://naoshige.probsd.net/work/pimpin)

But it doesn’t work. The way I include the CSS must be wrong.

```
ActionScript Code:
[FONT=Courier New][LEFT]countTexts2[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

```

beenBefore3 = [COLOR=#000080]1[/COLOR];  
[COLOR=#000000] **function** [/COLOR] action2COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
theNumber2 = [COLOR=#0000FF]random[/COLOR]COLOR=#000000[/COLOR]+[COLOR=#000080]1[/COLOR];  
[COLOR=#0000FF]trace[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000] **var** [/COLOR] features\_lv2:[COLOR=#0000FF]LoadVars[/COLOR] = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]LoadVars[/COLOR]COLOR=#000000[/COLOR];  
features\_lv2.[COLOR=#0000FF]onLoad[/COLOR] = onText2;  
features\_lv2.[COLOR=#0000FF]load[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000] **function** [/COLOR] onText2COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#0000FF]if[/COLOR] [COLOR=#000000]([/COLOR]COLOR=#000000[/COLOR] && [COLOR=#000000]([/COLOR]theNumber2 != beenBefore3[COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]  
styles.[COLOR=#0000FF]load[/COLOR]COLOR=#000000[/COLOR];  
ad\_text.[COLOR=#000080]styleSheet[/COLOR] = styles;  
ad\_text.[COLOR=#0000FF]html[/COLOR] = [COLOR=#000000] **true** [/COLOR];  
ad\_text.[COLOR=#0000FF]htmlText[/COLOR] = features\_lv2.[COLOR=#000080]ad[/COLOR];  
beenBefore3 = theNumber2;  
[COLOR=#000000]}[/COLOR] [COLOR=#0000FF]else[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#808080]_//_[/COLOR]  
[COLOR=#808080]_// trace(“offline”);_[/COLOR]  
[COLOR=#808080]_//_[/COLOR]  
action2COLOR=#000000[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[COLOR=#000000]}[/COLOR]  
[COLOR=#000000]}[/COLOR]  
[/LEFT]  
[/FONT]

> 

style.css:

body {  
font-family: kroeger\_05\_56;  
font-size: 8px;  
color: #FFF;  
}

a {  
font-family: kroeger\_05\_66;  
font-decoration: underline;  
}

a:hover {  
color: #333;  
}

> 

ad\_1.txt:

ad=TESTING 1, 2, 3 \<a href=“[http://test.com](http://test.com)”\>HEYA\</a\> SAY WORD NOW!

Thanks for bothering!
