Đang chuẩn bị liên kết để tải về tài liệu:
Flash XML Applications Use AS2 and AS3 to Create Photo Galleries, Menus, and Databases phần 10

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Chúng tôi nhập khẩu các lớp MovieClip và cho các lớp văn bản chúng tôi hiện đang sử dụng một ký tự đại diện. Chúng tôi tuyên bố chỉ có một biến, "tf", TextField kiểu dữ liệu. flash.display.MovieClip nhập khẩu, flash.text nhập khẩu . | Flash XML Applications It is time to see what the ButText class looks like. Basically it is a script that creates a text field with formatting. Then there are a number of getters and setters which are needed to change the text format of the text field once it has been created. We import the MovieClip class and for the text classes we currently use a wildcard. We declare only one variable tf of data type TextField. import flash.display.MovieClip import flash.text. public class ButText extends MovieClip private var tf TextField public function ButText In the constructor we place a script to create a new text field with various properties like x and y coordinates width and so on. We disable any mouse reaction of the text field tf new TextField tf.name tf tf.mouseEnabled false tf.x this.x tf.y this.y tf.width this.width tf.height this.height tf.wordWrap false tf.multiline false tf.textColor 0x000000 tf.htmlText TextField We also add the line this.addChild tf . The this word would refer to the object that is calling the ButText class for example the EventButton class which extends the ButText class. The text field would then be placed on the EventButton instance this.addChild tf We further create a default text format which determines basic properties of the text field var format TextFormat new TextFormat format.align center format.font Arial format.size 12 tf.defaultTextFormat format To make this class more versatile and be able to change properties at runtime when the text field is already created we add getter and setter methods for changing the text field content x y width height wordwrap multiline color and some other properties of the text field and associated text. Chapter 19 The Search Engine Part 1 28 This allows adding button behavior to text in a text field such as italic bold and or color change to mention a few examples. I have listed only two examples here for getters and setters for the label . public function set tf_label t_label String void tf.htmlText

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.