tailieunhanh - Foundation Flash CS4 for Designers- P13

Foundation Flash CS4 for Designers- P13: 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?” | CHAPTER 7 Your turn Make an animated button So far we ve covered many animation techniques and demonstrated them with a lot of examples. Now you can use some of these techniques to animate a button. Adding some animated glint By now you should get the idea that combined timelines are useful things. Here s a quick look at a very popular effect for the over state of a button symbol. Even a little bit of motion can add just the right touch to liven up an otherwise simple button. 1. Open the file in the Exercise folder for this chapter. Test the movie to see how the buttons currently work. It s certainly not bad looking but plain vanilla nonetheless. We re going to add some animated glint to the Over frame. 2. Double-click the glint asset in the library to enter its timeline. There are three things to notice here A scripts layer tells the timeline to play only once stop in frame 5 . A mask layer constrains the animation to the shape of the button only. A shape-tweened layer named glint moves a rounded rectangle from above to below the mask. 3. Double-click the button symbol in the library to enter its timeline. Add a new layer above the bg background layer. Name the new layer glint. Insert a keyframe in the glint layer at the Over frame. 4. Drag the glint movieclip to the stage in the Over keyframe. Use the Property inspector to position the glint symbol at X 0 and Y -30. 5. Insert a blank keyframe Insert Timeline Blank Keyframe in the Down frame of the glint layer. This keeps the animation from occurring while the mouse clicks the button. It will show only when the mouse hovers over the button and when the mouse releases from a clicked state both of which lead to an over state. 6. Test your movie to see the results. An even cooler animated button The next technique you ll try goes right back to the roots of Flash and the first efforts aimed at getting video to play in Flash. You will be dealing with video in greater depth in Chapter 10 but here is a

crossorigin="anonymous">
Đã 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.