TAILIEUCHUNG - Writing Your First Script

Trong phần đầu của tập thể dục này, chúng tôi tạo nguồn cho các dữ liệu được nạp vào bộ phim của chúng tôi khi nó đóng. Đối với dự án của chúng tôi, nguồn dữ liệu này chứa một giá trị đại diện cho số tiền của các hóa đơn điện. Khi Flash tải tập tin văn bản, nó diễn dịch dòng này của văn bản và tạo ra trong phim một phần dữ liệu (gọi là một biến) electricBill đặt tên và gán cho nó một giá trị của 60. Giá trị của biến này sẽ được sử. | Writing Your First Script Now that we have all the information we need as well as a rough storyboard for our project let s assemble it. 1. Open Windows Notepad or Apple Simple Text to create a new text file and type electricBill 60. In the first part of this exercise we create the source for the data to be loaded into our movie when it plays. For our project this data source contains a value representing the amount of the electric bill. When Flash loads this text file it interprets this line of text and creates within the movie a piece of data called a variable named electricBill and assigns it a value of 60. The value of this variable will be used in several ways in our project. NOTE Loading data into Flash from external sources is discussed in detail in Lesson 11 Getting Data In and Out of Flash. Variables are discussed in detail in Lesson 6 Creating and Manipulating Data. 2. Name the text file and save it in the folder that contains the files for this lesson. Open in the Lesson01 Assets folder. With the exception of setting up scripts our project elements are largely in place. Remember the focus of this book is ActionScript not how to use Flash. Our project s main timeline contains five layers. The layers will be named in such a way that their content is evident. Currently the Actions layer is empty. 3. Open the Property Inspector and select the text field to the right of the text that reads You currently owe . In the Property Inspector give this text field an instance name of owed_txt. Because this text field will be used to display the amount of the electric bill we ve named it owed_txt. We add the _txt suffix to this text field s name so that when we create the script that references it code hints will appear. 4. With the Property Inspector open select the text field to the right of the text that reads Enter the amount you would like to pay . In the Property Inspector give this text field an instance name of paid_txt. The .

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.