Application of HTML and CSS in Flash

Application of HTML and CSS in Flash
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

Recommend

Using vue3 to imitate the side message prompt effect of Apple system

Table of contents Animation Preview Other UI Libr...

How to view Linux ssh service information and running status

There are many articles about ssh server configur...

How to use shell to perform batch operations on multiple servers

Table of contents SSH protocol SSH Connection pro...

XHTML no longer uses some obsolete elements in HTML

When we do CSS web page layout, we all know that i...

How to connect to MySQL using C++

C++ connects to MySQL for your reference. The spe...

JavaScript to implement slider verification code

This article shares the specific code of JavaScri...

Analysis of the Principle and Method of Implementing Linux Disk Partition

remember: IDE disk: the first disk is hda, the se...

What is the file mysql-bin.000001 in mysql? Can it be deleted?

After installing MySQL using ports, I found that ...

A brief discussion on the three major issues of JS: asynchrony and single thread

Table of contents Single thread asynchronous Sing...

How to Monitor Linux Memory Usage Using Bash Script

Preface There are many open source monitoring too...

Why the table file size remains unchanged after deleting data in MySQL

For databases that have been running for a long t...

How to deploy SpringBoot project using Docker

The development of Docker technology provides a m...

Understand all aspects of HTTP Headers with pictures and text

What are HTTP Headers HTTP is an abbreviation of ...

View MySQL installation information under Linux server

View the installation information of mysql: #ps -...