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
Hệ điều hành
extremetech Hacking BlackBerry phần 9
Đang chuẩn bị liên kết để tải về tài liệu:
extremetech Hacking BlackBerry phần 9
Ngọc Tuấn
273
31
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Các từ khóa mở rộng là cơ sở để thừa kế trong Java. Vì vậy, về cơ bản với các dòng đầu tiên này, bạn đang nói, "Tôi tuyên bố một HelloBlackBerry lớp mới, và tôi muốn nó kế thừa tất cả những hành vi được tìm thấy trong UIApplication | 214 Part II Advanced BlackBerry Hacks public void run Play a B note private Menuitem CItem new MenuItem C 2 0 public void run Play a C note private Menuitem Dbitem new MenuItem Db 2 0 public void run Play a Db note private Menuitem Ditem new Menuitem D 2 0 public void run Play a D note private Menuitem Ebitem new Menuitem Eb 2 0 public void run Play an Eb note private Menuitem Eitem new Menuitem E 2 0 public void run Play an E note private Menuitem FItem new Menuitem F 2 0 public void run Play an F note private Menuitem Gbitem new Menuitem Gb 2 0 public void run Chapter 13 A Toy Piano in the Palm of Your Hand 215 Play a Gb note private Menuitem GItem new MenuItem G 2 0 public void run Play a G note private Menuitem Abitem new MenuItem Ab 2 0 public void run Play an Ab note You ll note that in the run code for each menu handler I have not yet added the actual code to play the corresponding note. For that you need to define a tune structure for each note as well as call the Alert.startAudio function to play the note. Playing Notes Using Alert.startAudio In order to have your PianoBerry menu items actually play their corresponding note you need to call the BlackBerry function Alert.startAudio . Alert.startAudio takes two parameters one that represents the tune to be played and another that represents the percent volume you want to play the tune at. The tune parameter is actually an array of integer pairs that use the following format frequency duration . Each pair thus plays a note of a given frequency for the length of time you specify. In this pair of integers the frequency is expressed in MHz while the duration is expressed as milliseconds. Although the tune parameter is an array and can contain an actual sequence of notes to be played for the purposes of PianoBerry you are interested in playing only a single note at a time. So what you need to do is to figure out the frequency value for each of the 12 notes in your scale and then create pairs of integers that .
TÀI LIỆU LIÊN QUAN
Hacking BlackBerry: ExtremeTech
extremetech Hacking BlackBerry phần 5
extremetech Hacking BlackBerry phần 6
extremetech Hacking BlackBerry phần 7
extremetech Hacking BlackBerry phần 8
extremetech Hacking BlackBerry phần 9
extremetech Hacking BlackBerry phần 10
extremetech Hacking BlackBerry phần 1
extremetech Hacking BlackBerry phần 2
extremetech Hacking BlackBerry phần 3
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.