tailieunhanh - Learning Flash CS4 Professional phần 6

Điều này tween đầu tiên trong lớp sẽ phai trong bánh xe ở kích thước của nó. 18. Tạo một keyframe vào frame 20 để phục vụ các keyframe cuối cùng này tween ban đầu, mà không yêu cầu phải thay đổi. Trong frame 2, chọn bánh xe trên Stage và, bằng cách sử dụng bảng Properties, thiết lập phong cách Color Effect để Alpha | The Display List But that s only the first half of the story. This code creates an object in this case a movie clip but it only places that object in memory. It hasn t yet become a part of the list of assets the user can see. The second half of the story is adding the object to the display list. Using addChild The primary way to add a movie clip to the display list is by using the addChild method. To add the movie clip you created a moment ago to the main Timeline you can place this statement after the prior instruction to create the movie clip addChild mc Despite its simplicity this code does imply a destination for the movie clip. By omitting an explicit destination you cause the movie clip to be added to the scope in which the script was written in this case the main Timeline. You can specify a particular location to which the movie clip will be added but not all display objects will be happy to adopt a child. For example neither the Video nor Bitmap display object types can have children. To include a child the destination must be a display object container. Examples of display object containers include Stage MovieClip and Sprite a one-frame movie clip with no Timeline but for the purposes of this chapter you ll continue to work with movie clips. So if you wanted to add the mc movie clip nested inside another movie clip called mc2 you would provide a destination object for the addChild method to act upon mc You don t even have to specify a depth visible stacking order because the display list automatically handles that for you. In fact you can even use the same code for changing the depths of existing display objects. Adding Symbol Instances to the Display List from the Library Thus far you ve either referenced display objects using instance names that have been applied on the Stage through the Properties panel or limited the dynamic creation of display objects to empty movie clips. However you will likely find a need to dynamically create and use

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.