Loading HTML and CSS in Flash

Source: Internet
Author: User

 

Loading HTML and cssas code in flash:

Add a dynamic text box named loadtxt_css in the scenario.

Write the following code to the new layer:

VaR loadtxt_css: textfield. stylesheet = new textfield. stylesheet ();

// Defines loadtxt_css as a style constructor.

Loadtxt_css.load ("css.css ");

// Load the pre-defined CSS style File

Loadtxt. stylesheet = loadtxt_css;

// The dynamic text box style defaults to the loaded Style

Loadtxt. multiline = true;

// Allow multiple rows to be displayed

Loadtxt. wordwrap = true;

// Supports line breaks

Loadtxt.html = true;

// Html supported

VaR loadtxt_html: xml = New XML ();

// Defines loadtxt_html as internal XML (used to load external files)

Loadtxt_html.ignorewhite = true;

// Ignore Spaces

Loadtxt_html.load ("html.html ");

// Load the HTML file

Loadtxt_html.onload = function ()

{

Loadtxt.html text = loadtxt_html;

// Assign HTML to the dynamic text box

};

// Succeeded

Bytes ------------------------------------------------------------------------------------------------------------------------

CSS code:

Create a css.css file in the same folder as the flash file:

The Code is as follows:

Mainbody {

Font-family: "";

Color: #666666;

Font-size: 12px;

}

Biline {

Font-family: "";

Color: #666666;

Font-size: 12px;

Font-style: italic;

}

A {

Font-family: "";

Color: #666666;

Font-size: 12px;

Display: inline;

Text-Decoration: underline;

}

A: hover {

Font-family: "";

Color: #0077d5;

}

. Style2 {

Color: #333333;

Font-family: "";

Font-size: 12pt;

}

. Style4 {color: # ff3300 ;}

A: link {

Color: #666666;

Text-Decoration: none;

}

A: visited {

Text-Decoration: none;

}

Bytes ------------------------------------------------------------------------------------------------------------------------

HTML code:

Create an html.html file in the same folder as the flash file:

The Code is as follows:

<Style type = "text/CSS">

</Style> <body>

<Tobody> <SPAN class = "style4"> popular keywords: </span> <a href = "http://www.baidu.com" target = "_ blank"> dancing Conference </a> | <a href = "http://www.google.com"> Saddam </a> | accord female | famous shock | Tsai Yilin | the video with the selfie color is coming to your attention! </Tobody>

</Body>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.