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 19
Đang chuẩn bị liên kết để tải về tài liệu:
Học Actionscript 3.0 - p 19
Thiệu Bảo
81
10
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Simple Physics Simple Physics In the quest for more expressive animation, you will find that adding physics to animations, games, and similar projects can really elevate them to another level of user enjoyment. The visual appearance and, in interactive scenarios, even the user experience of a project are sometimes dramatically enhanced by surprisingly small code additions. We’re going to be discussing some basic physics principles in this section, but it’s more important for you to understand their effects than to focus minutely on the math and science behind them. This is because the formulas offered here are necessarily simplified, or even adapted,. | Simple Physics Simple Physics In the quest for more expressive animation you will find that adding physics to animations games and similar projects can really elevate them to another level of user enjoyment. The visual appearance and in interactive scenarios even the user experience of a project are sometimes dramatically enhanced by surprisingly small code additions. We re going to be discussing some basic physics principles in this section but it s more important for you to understand their effects than to focus minutely on the math and science behind them. This is because the formulas offered here are necessarily simplified or even adapted from their real-world counterparts. Once you re comfortable with the principles in general you can refine formulas account for additional variables and so on to improve their realism. For example it s often helpful to first simulate the simple orbit of a planet before considering the orbit s decay the gravitational attraction of other bodies and so on. Gravity What happens when you toss a ball into the air It goes up starts to slow down as gravity affects its rate of ascent it stops momentarily at the top of its journey and then the ball starts moving faster again as gravity starts to accelerate its trip downward. If you think about it carefully a simple ActionScript simulation of gravity requires little more than acceleration in the y direction. The following code found in the gravity.fla source file requires only minor changes to the previous acceleration example. Here we ll focus on acceleration in the y direction and we ll start with a negative y velocity to start the ball moving upward 1 var ball MovieClip new Ball 2 ball.x ball.y 100 3 addChild ball 4 5 var xVel Number 4 6 var yVel Number -10 7 var yAcc Number 1 8 9 addEventListener Event.ENTER_FRAME onLoop false 0 true 10 function onLoop evt Event void 11 ball.x xVel 12 ball.y yVel 13 14 yVel yAcc 15 The ball begins moving at 10 pixels per enter frame event but .
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.