Css
Today to introduce you to the question about CSS, I hope you learn how to use CSS.
Step 1:
Create a dynamic problem bar on the scene, set instance name output, set to multiline.
Step 2:
Input the following in the first frame:
var myStyle = new Textfield.stylesheet ();
var txt = "<p class= ' C1 ' >www.webjx.com 1</p><p class= ' C2 ' >www.webjx.com"; //Note the class here, he will render it according to the way you set it in your CSS file
mystyle.load ("Style.css");
Mystyle.onload = function (loaded) {
if (loaded) {
Output.stylesheet = MyStyle;
Output.text = txt;
} else {
Output.text = "CSS file not found!_!";//css Load not successful
}
};
Step 3:
Open Notepad, enter the following code to save as STYLE.CSS, and Flash files in the same directory
. c1 {
Font-family:arial, Helvetica, Sans-serif;
font-size:18px;
Font-weight:bold;
Color: #000000;
}
. c2 {
Font-family:arial, Helvetica, Sans-serif;
font-size:24px;
Font-weight:bold;
Color: #FF6600;
}
Step 4:
Publish and test, you need to use HTML to see ... Otherwise it will show that CSS cannot be loaded ...:)