1. Trang chủ
  2. » Công Nghệ Thông Tin

What Event Handlers Do

2 197 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 2
Dung lượng 8,71 KB

Nội dung

< Day Day Up > What Event Handlers Do Many computer programs allow users to accomplish tasks by dragging and dropping items on the screen, resizing windows, making adjustments with sliders, and creating artistic masterpieces using "virtual" art tools—all modes of interaction determined by the way in which the software has been programmed to deal with various events (mouse presses, mouse movements, keyboard input, and so on). Event handlers orchestrate your movies' interactivity by controlling when scripts are triggered. They provide a "when" to a script so that it executes only when something specific occurs. Every script in your movie is triggered by an event—a user rolling over a button or pressing a key, your movie's timeline reaching a certain frame, and so on. In ActionScript, event handlers (with the exception of frame events) usually represent the first lines in a script. For example: When this happens (event) { do this; do this; } Frame events occur when the timeline reaches a frame that contains a script. When you place a script on a frame, you don't need to identify a frame event to trigger that script because the timeline reaching the frame is enough to cause it to execute. If the script were placed in a frame, it would look like this: do this; do this; The better you understand event handlers, the more control you'll have over the user's experience. By using event handlers properly, you can create immersive environments the user will enjoy. < Day Day Up > . this: do this; do this; The better you understand event handlers, the more control you'll have over the user's experience. By using event handlers. exception of frame events) usually represent the first lines in a script. For example: When this happens (event) { do this; do this; } Frame events occur when

Ngày đăng: 17/10/2013, 21:15

TỪ KHÓA LIÊN QUAN