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

Analysis of several situations where MySQL index fails

1. Best left prefix principle - If multiple colum...

Install MySQL5.5 database in CentOS7 environment

Table of contents 1. Check whether MySQL has been...

Vue custom component implements two-way binding

Scenario: The interaction methods between parent ...

MySQL account password modification method (summary)

Preface: In the daily use of the database, it is ...

How to update the view synchronously after data changes in Vue

Preface Not long ago, I saw an interesting proble...

Tutorial for installing MySQL 8.0.18 under Windows (Community Edition)

This article briefly introduces how to install My...

The difference and reasons between the MySQL query conditions not in and in

Write a SQL first SELECT DISTINCT from_id FROM co...

How to use geoip to restrict regions in nginx

This blog is a work note environment: nginx versi...

MySQL 8.0.18 stable version released! Hash Join is here as expected

MySQL 8.0.18 stable version (GA) was officially r...

Responsive layout summary (recommended)

Basic knowledge of responsive layout development ...

Summary of some points to note when registering Tomcat as a service

Here are some points to note when registering Tom...