Use Flash as script to control the code _flash as in the text box style of flash

Source: Internet
Author: User
Often see the Flash book in the file box can dynamically modify its style, today wrote a small example for everyone to learn! Reprint Please keep: Blu-ray Blueshine effect is as follows:
/upload/20071124121452211.swf
Copy Code code as follows:

var Style = new TextFormat ();
Define a text Format
Style_txt.bordercolor = 0xdddddd;
Size_txt.bordercolor = 0xdddddd;
Style_txt.htmltext = "<a href= ' http://www.blue-sun.cn ' > Blu-ray blog blueshine</a>" +
"<br>http://www.blue-sun.cn<br> When you modify the following style, the text box style is not changed!"
Modify the font size when text box content changes
size_txt.onchanged = function () {
Style.size = This.text;
_root.style_txt.settextformat (style);
};
Modify text color
var listenobj_com = new Object ();
Listenobj_com.change = function () {
Style.color = Color_com.text;
_root.style_txt.settextformat (style);
};
Color_com.addeventlistener ("Change", listenobj_com);
Modify text Weight
var listenobj_che1 = new Object ();
Listenobj_che1.click = function () {
Style.bold = cuti_che.selected;
_root.style_txt.settextformat (style);
};
Cuti_che.addeventlistener ("click", Listenobj_che1);
Modify Text Italic Properties
var listenobj_che2 = new Object ();
Listenobj_che2.click = function () {
Style.italic = xieti_che.selected;
_root.style_txt.settextformat (style);
};
Xieti_che.addeventlistener ("click", Listenobj_che2);

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.