Application of HTML and CSS in Flash: I accidentally saw my colleague Den making something: using HTML and CSS in Flash. The code is as follows: 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 for loading external CSS and HTML (actually loading XML as HTML using -_-b). Later, Den wrote two ways to write styles in AS: 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, just spell the string directly. Whether to write CSS in AS or load external CSS depends on the situation. When using it on the Web, you also need to consider the number of requests, file size, cache, and more importantly, maintenance costs. However, I can't think of any suitable application in Web applications. It doesn't make much sense to use HTML to load Flash in the browser and then use Flash to load HTML and CSS. Moreover, the support is very weak. Take a look at the supported HTML tags and CSS attributes. = I originally wanted to use it to solve the problem of Chinese underline, but it didn't work. I heard that others use flash to draw underline. Just play around with the browser app. Stay with the desktop app. |
<<: Summary of common docker commands
>>: MySQL DATE_ADD and ADDDATE functions add a specified time interval to a date
1. Location regular expression Let's take a l...
Table of contents Animation Preview Other UI Libr...
There are many articles about ssh server configur...
Table of contents SSH protocol SSH Connection pro...
When we do CSS web page layout, we all know that i...
C++ connects to MySQL for your reference. The spe...
This article shares the specific code of JavaScri...
remember: IDE disk: the first disk is hda, the se...
After installing MySQL using ports, I found that ...
Table of contents Single thread asynchronous Sing...
Preface There are many open source monitoring too...
For databases that have been running for a long t...
The development of Docker technology provides a m...
What are HTTP Headers HTTP is an abbreviation of ...
View the installation information of mysql: #ps -...