Loading HTML and cssas code in flash:
Add a dynamic text box named loadtxt_css in the scenario.
Write the following code to the new layer:
VaR loadtxt_css: textfield. stylesheet = new textfield. stylesheet ();
// Defines loadtxt_css as a style constructor.
Loadtxt_css.load ("css.css ");
// Load the pre-defined CSS style File
Loadtxt. stylesheet = loadtxt_css;
// The dynamic text box style defaults to the loaded Style
Loadtxt. multiline = true;
// Allow multiple rows to be displayed
Loadtxt. wordwrap = true;
// Supports line breaks
Loadtxt.html = true;
// Html supported
VaR loadtxt_html: xml = New XML ();
// Defines loadtxt_html as internal XML (used to load external files)
Loadtxt_html.ignorewhite = true;
// Ignore Spaces
Loadtxt_html.load ("html.html ");
// Load the HTML file
Loadtxt_html.onload = function ()
{
Loadtxt.html text = loadtxt_html;
// Assign HTML to the dynamic text box
};
// Succeeded
Bytes ------------------------------------------------------------------------------------------------------------------------
CSS code:
Create a css.css file in the same folder as the flash file:
The Code is as follows:
Mainbody {
Font-family: "";
Color: #666666;
Font-size: 12px;
}
Biline {
Font-family: "";
Color: #666666;
Font-size: 12px;
Font-style: italic;
}
A {
Font-family: "";
Color: #666666;
Font-size: 12px;
Display: inline;
Text-Decoration: underline;
}
A: hover {
Font-family: "";
Color: #0077d5;
}
. Style2 {
Color: #333333;
Font-family: "";
Font-size: 12pt;
}
. Style4 {color: # ff3300 ;}
A: link {
Color: #666666;
Text-Decoration: none;
}
A: visited {
Text-Decoration: none;
}
Bytes ------------------------------------------------------------------------------------------------------------------------
HTML code:
Create an html.html file in the same folder as the flash file:
The Code is as follows:
<Style type = "text/CSS">
</Style> <body>
<Tobody> <SPAN class = "style4"> popular keywords: </span> <a href = "http://www.baidu.com" target = "_ blank"> dancing Conference </a> | <a href = "http://www.google.com"> Saddam </a> | accord female | famous shock | Tsai Yilin | the video with the selfie color is coming to your attention! </Tobody>
</Body>