TAILIEUCHUNG - Foundation Flash CS4 for Designers- P11

Foundation Flash CS4 for Designers- P11: I can remember the day as clear as if it were just yesterday. I was walking by my boss’s office late one winter afternoon at the college where I teach, and he called me into his office. Sitting on his desk was a thin, white box with some sort of weird swirl on it. He slid the box across to me and asked, “You know anything about Flash?” | TEXT 2. Click the Text layer and select the Text tool or press the T key. 3. Click the stage and enter Show the frog hide the frog. Specify these text settings in the Property inspector Type Static Text Font Arial Size 14 Color 000000 black 4. Select the text Show and hide and in the Property inspector change their color to 0099FF bright blue . 5. Using the Text tool select the text Show and enter event show into the Link field of the Property inspector as shown in Figure 6-29. The text you entered is the TextEvent LINK event you will be using when you write the code. Figure 6-29. Using a link to trigger an ActionScript text event 287 CHAPTER 6 6. Select the text hide and enter event hide into the Link field of the Property inspector. 7. Select the first frame in the Actions layer open the Actions panel and enter the following ActionScript addEventListener linkHandler function linkHandler evt TextEvent void if show true else false The first line of the code creates the listener and tells Flash what to listen for textEvent LINK and what to do execute the function named linkHandler when it hears the event. The function checks to see which of the two hyperlinks was clicked. If it was the word Show and the event s text property is show then the frog movieclip has its visible property set to true which means the frog movieclip appears. The else simply says if it isn t the word Show then hide the frog movieclip by setting the movieclip s visible property to false. 8. Save and test the movie. Using hyperlinks with a dynamic text field Now that you know how to control events using static text let s try it out using a dynamic text field. 1. Open the file in this chapter s Exercise folder. It is the same file as the previous exercise and all we are going to ask you to do is to write the code. 2. Select the first frame in the Actions layer open the Actions panel click once in the Script pane and enter 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.