The application of HTML and CSS in Flash:
I accidentally saw my colleague Den getting a little something: using HTML and CSS in Flash, the code is this:
Example Source Code
var myStyle:TextField.StyleSheet = new Textfield.stylesheet ();
Mystyle.load ("Sample.css");
Content_txt.stylesheet = MyStyle;
Content_txt.multiline= true;
Content_txt.wordwrap = true;
Content_txt.html = true;
var story:xml = new XML ();
Story.ignorewhite = true;
Story.load ("sample.html");
Story.onload = function () {
Content_txt.htmltext = story;
}
This is loaded with an external CSS with HTML (actually loading XML when HTML is-_-b). Later Den wrote two ways to write the style in as:
Example Source Code
var css_str:string = ". Aoao{color: #010101; font-weight:bold;}. Aoao:hover{color: #ff0000} ";
Mystyle.parsecss (CSS_STR) Mystyle.setstyle (". Aoao", {color: ' #010101 ', fontweight: ' Bold '});
Mystyle.setstyle (". Aoao:hover", {color: "#ff0000"});
In fact, HTML can also be written in as inside, directly spelled string on the line. For CSS to write in as or load external CSS will see the situation, with the web to consider the number of requests, file size, caching, more importantly, maintenance costs. But in the Web application I did not think of any more suitable applications, in the browser using HTML to load flash and then loaded with flash HTML and css meaning is not very small, and support is not generally weak, look at the support of HTML tags and css properties, =. = originally want to use to solve the problem of Chinese underline, the result is still not, it is said that others are using flash draw underline drop.
The application of the browser to play and forget it. Still stay on the desktop application bar.