adobe press ActionScript 3.0 for ADOBE FLASH PROFESSIONAL CS5 Classroom in a Book phần 3

Ở đây, tôi đã có thể kéo góc xử lý và nhấp vào bên trong bất kỳ của chín ngành và kéo chuột để thao tác các lớp cờ Smart Object, cũng giống như khi tôi đã được kéo dài hình ảnh trên vải cao su. Chú ý rằng tham số cho progressHandler () chức năng có các kiểu dữ liệu của ProgressEvent. Sự kiện ProgressEvent hoạt động tương tự như các sự kiện mà bạn đã sử dụng. | powerful ActionScript toolset for creating and manipulating vector graphics. In the Ellipse function the first of these lines indicates that the vector graphics that are about to be created will have a specific fill color color The color parameter determines the color of the ellipse. Remember that this parameter was set to a default of red when you created the function but can be overridden when called. The second line of code draws an ellipse using a built-in function called drawEllipse . 0 0 w h This function or method takes four parameters. The first two parameters set the position of the ellipse in this case to 0 horizontally and 0 vertically the upper-left corner . The next two use the w and h parameters of the Ellipse function to set the width and height of the ellipse. Required versus optional parameters If a function has parameters that are given default values as in the example in step 3 then when the function is called references to those parameters do not need to be included. These are called optional parameters. If references to these parameters are included with new values they will override the default values. You will see this in action soon. If a function has parameters that are not given initial values you need to assign these values when calling the function. These are called required parameters. The third line inside the Ellipse function ends the fill and completes the drawing 4 Save your file. Your entire Ellipse class file should now read package Import public class Ellipse extends MovicChp public function Ellipse w Number340 h Numbers40 color Number OxffOOOO graphics heglnFill c0lor . w. h graphics. endFill You ll soon get to test your handiwork. ACTIONSCRIPT FOR ADOBE FLASH PROFESSIONAL CS5 CLASSROOM IN A BOOK 73 ActionScript and hexadecimal color Actionscript can describe colors in a variety of ways but the most common is as .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.