Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Học Actionscript 3.0 - p 9
Đang chuẩn bị liên kết để tải về tài liệu:
Học Actionscript 3.0 - p 9
Tân Phước
84
10
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Events 1 2 3 4 5 6 7 8 9 10 11 12 function onMoveLeft(evt:MouseEvent):void { box.x -= 20; } function onMoveRight(evt:MouseEvent):void { box.x += 20; } function onMoveUp(evt:MouseEvent):void { box.y -= 20; } function onMoveDown(evt:MouseEvent):void { box.y += 20; } Once the functions are defined, all you have to do is add the listeners to the appropriate buttons. 13 14 15 16 move_left_btn.addEventListener(MouseEvent.MOUSE_UP, onMoveLeft); move_right_btn.addEventListener(MouseEvent.MOUSE_UP, onMoveRight); move_up_btn.addEventListener(MouseEvent.MOUSE_UP, onMoveUp); move_down_btn.addEventListener(MouseEvent.MOUSE_UP, onMoveDown); This simple process is then repeated for each of the buttons on stage. The remaining script collects the aforementioned properties and event listeners to complete the demo pictured in Figure 3-3. The resulting file wires up one or more buttons for each property, all of which manipulate the movie clip in the center of. | Events 1 function onMoveLeft evt MouseEvent void 2 box.x - 20 3 4 function onMoveRight evt MouseEvent void 5 box.x 20 6 7 function onMoveUp evt MouseEvent void 8 box.y - 20 9 10 function onMoveDown evt MouseEvent void 11 box.y 20 12 Once the functions are defined all you have to do is add the listeners to the appropriate buttons. 13 move_left_btn.addEventListener MouseEvent.MOUSE_UP onMoveLeft 14 move_right_btn.addEventListener MouseEvent.MOUSE_UP onMoveRight 15 move_up_btn.addEventListener MouseEvent.MOUSE_UP onMoveUp 16 move_down_btn.addEventListener MouseEvent.MOUSE_UP onMoveDown This simple process is then repeated for each of the buttons on stage. The remaining script collects the aforementioned properties and event listeners to complete the demo pictured in Figure 3-3. The resulting file wires up one or more buttons for each property all of which manipulate the movie clip in the center of the stage. The finished script can be found in the prop_events. fla source file. 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 scale_up_btn.addEventListener MouseEvent.MOUSE_UP onScaleUp scale_down_btn.addEventListener MouseEvent.MOUSE_UP onScaleDown rotate_left_btn.addEventListener MouseEvent.MOUSE_UP onRotateLeft rotate_right_btn.addEventListener MouseEvent.MOUSE_UP onRotateRight fade_in_btn.addEventListener MouseEvent.MOUSE_UP onFadeln fade_out_btn.addEventListener MouseEvent.MOUSE_UP onFadeOut toggle_visible_btn.addEventListener MouseEvent.MOUSE_UP onToggleVisible function onScaleUp evt MouseEvent void box.scaleX 0.2 box.scaleY 0.2 function onScaleDown evt MouseEvent void box.scaleX - 0.2 box.scaleY - 0.2 function onRotateLeft evt MouseEvent void box.rotation - 20 function onRotateRight evt MouseEvent void box.rotation 20 function onFadeIn evt MouseEvent void box.alpha 0.2 Chapter 3 Properties Methods and Events Download from Wow eBook www.wowebook.com Methods 49 function onFadeOut evt MouseEvent void 50 box.alpha - 0.2 .
TÀI LIỆU LIÊN QUAN
TỪ ĐIỂN ActionScript
Flash: ActionScript Language Reference- P1
Flash: ActionScript Language Reference- P2
Flash: ActionScript Language Reference- P3
Flash: ActionScript Language Reference- P4
Flash: ActionScript Language Reference- P5
Flash: ActionScript Language Reference- P6
Flash: ActionScript Language Reference- P7
Flash: ActionScript Language Reference- P8
Flash: ActionScript Language Reference- P9
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.