Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic HTML from text file 1

Status
Not open for further replies.

snakehips2000

Programmer
Nov 10, 2003
95
GB
I'm dynamically populating a Flash text box from a text file. Usiong LoadVars, the data populates fine but I can't get it to format correctly using the external CSS stipulated in the text file. Here are the simple contents of my text file:

content=<link href="../Main.css" rel="stylesheet" type="text/css"><LinkColor>07780 777774.</LinkColor>

This is my CSS file stored in a directory one level higher (I've also tried storing the CSS file in the same folder):

body {
font-family: Tahoma, Arial, Verdana, _sans;
font-size:22px;
color: ##000000;
text-align:left;
}

.style1 {
font-family: Tahoma, Arial, Verdana, _sans;
font-size:22px;
color: ##000000;
text-align:left;
}

.LinkColor {
font-family: Tahoma, Arial, Verdana, _sans;
font-size:14px;
color:#FF0000;
text-align:left;
font-weight: bolder;
}

Is there something I'm missing here?
 
You can use an external style sheet in Flash but that isn't how you would do it. You have to load the stylesheet into flash by using the TextField.StylSheet() object.

Here's an example. Get it Here

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top