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

Tôi sau đó đã đi vào menu Edit và chọn Edit ➯ Chuyển đổi ➯ Warp. Các tùy chọn mặc định là chế độ Custom, nơi mà tôi đã truy cập để kiểm soát bezier xử lý tại bốn góc của hộp ranh giới dọc. Đây có thể được điều chỉnh trong cùng một cách như bạn sẽ thao tác một đường dẫn bút để điều khiển hình dáng bên ngoài của sợi dọc. | After the event name and separated by a comma is the name of the function that occurs when the ROLL_OVER event takes place. A function is just a block of code that performs one or more usually related tasks. An event-handler function is one that responds to an event. Functions can be created and given any name that you like following the same three rules that we saw for naming variables in Lesson 1 Using Code Snippets and Navigating the Flash Timeline. In the example the function name is showMenu. It is a good idea to name functions so that they describe what they are supposed to do. Reviewing the naming rules in ActionScript Remember that when you are naming variables functions classes and instances in Actionscript you should follow these three rules Use only letters numbers and underscores in your names avoid other special characters. Do not begin a name with a number. Avoid spaces in your names use underscores rather than spaces. The basic syntax for our function looks like this function showMenu e MouseEvent void all the ActionScript to show the menu would go here between the left and right curly braces. When creating a function in ActionScript always start with the lowercase word function and then the name you choose to give your function. After that you add a set of parentheses that contains what are called parameters. You will work with parameters more in the coming lessons for now it is enough to know that the required parameter for an event-handling function contains a reference to the event that triggered the function. After the parentheses a colon precedes information about the type of data that the function returns. In this case void means that the function does not return data. You will learn much more about functions in coming lessons. After that a pair of curly braces contains all the code that will take place each time an event triggers the function. If all this is not absolutely clear don t worry. After a little practice it begins to make more

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
13    135    1    21-05-2024
Đã 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.