Más contenido relacionado
Similar a Mgd09 lab01 (20)
Más de Hock Leng PUAH (20)
Mgd09 lab01
- 1. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨
’w—x’jiudr ”’w—l ‘f’ed–m
˜di‘—fij““v ’jiudr ”o‘f’ed–m t sr —q—p ”o’i–dn’‘—• ”‘f’ed–m ™’l k ’jih
g‘f’ed–“ ™’˜ — ’‘—’–• ” “’‘
‰igxˆ ‡„†…y€„i „‚yuƒg ‚t€yx wvp utsrqpihg
of game builder and visual mobile designer. You will also learn to use the SVG UI editor.
This lab series will take you through the process of developing a mobile game with the assistance
0)f1edc)b10a
988EYG`BYX'W¥V988E£BV$ §¦£§¤ §¤¢V$¨§¦§ £$¤'§ ¥¤£ ¢ %$$#¥!
¢U §T £'S ¤D £ §¤R%§! E8QQ A # '§ D P
¨ % £¦ ! £¥¤' %§ '¦¨¤£ ¨ ! %%I #H8A@98¡© o
§ ' ¨ %§ G£ % £¦ F ¦¥ ! ' ¤ %£¦ ¨ ¨§¦C #E8A@98¡© o
¤D £ %§ ¤D §¦ ! ' ¤ §¨¦ ¡ £¦¤© £¦ ¨§¦C #B8 A@98¡© o
# %£¦ ¨ %§ 7¡©6 §¨¦ % £¦¤ £¦¢ ¨§¦ ¨ £¦¤ ¥¤£ ¢ % ¤ 5¤4 •
310210)(
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 2. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨ D
’w—n ”’w—l ’n— f—m
Q’n— f—m —q—p k ™’l ”k’n— f—“ ‘j¤—£’B¢ fij• ‘¡niG
’n— f—“ ™’˜ BBv ”D “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 3. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨ R
‘’j¡ rj—¤oiB ”’w—˜ ‘’j¡ r
Q ‘’j¡ r j—¤oiB k ™’l ”’n— f—“ ’w—n fij• ‘¡niG
‘’j¡ r j—¤oiB BBv ”R “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 4. §¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
b20¦f 2¥ 2¢f¤)£ ¢¡d f
’jiudw ˜nio’B d‘ ¤d© o’ju—˜’ ‘—¡‘ ’f—£–’‘˜i j—fi¡“—–n — oi ¨¡rB§ –’˜nio’¡ ’jiudr j—¤oiB ’¡U
B˜— ™dj£ ˜di‘—fij““— ’¡‘ ’˜i£’B d‘ ¤d© o™djj— ¡rB ’¡U go‘˜’˜d“wdf “d–B B˜— n—–B n˜io¤ o˜di‘—fij““—
’¡U g£j’o–¤d© ˜nio’B ¤d© o‘˜’˜d“wdf –d s¡ ’¡‘ ©u B’ij““¤o o‘˜’˜d“wdf ’¡‘ n˜io¤ Ex –¤d© ˜nio’B
o˜di‘—fij““— ’‘—’–f d‘ ’o¤ ˜—f ¤d© ‘—¡‘ o‘˜’˜d“wdf ¨ E§ ’f—£–’‘˜ –’oE B–—B˜—‘o ©˜—w o˜i—‘˜df ¡rB
˜di‘—’–f ’¡‘ ©£ij“wio ‘—¡‘ o‘˜’˜d“wdf wd‘o¤f o’B¤jf˜i doj— ‘ go’n—w B˜— ow–dh o‘–’jv o‘oi o— ¡f¤o
g’–dw B˜— ow’‘ ’ju—U o˜’’–f ¡o—j“ o˜’’–f ‘i— o— ¡f¤o o’–¤‘—’£ ’j“wdf ’–dw £d
[Flow]
• Right after creating a Visual MIDlet you'll see the Flow Design, that currently is pretty
barren.
• You drag UI elements from the right-most list.
• You add commands to UI elements the same way, and draw flow lines from commands
to other UI elements etc.
• Visual Mobile Designer (VMD) will automatically create Java code that corresponds
exactly to what you've drawn in the Flow Design View.
• Always name the UI elements logically. Never use the default names, as they are
impossible to remember.
• If this view gets cluttered you can click on the right-most icon on the tab line (looking
like two boxes) to clean up the layout.
[Screen]
• The Screen Design tab is used for editing the contents of individual UI elements. To open
it you can double-click on any Screen.
• When dealing with command types I recommend the following:
o Use EXIT type for Application Exit
o Use OK type with a very high priority (low value) for Submit, Send, Save, Next
etc commands
o Use BACK type for Back, Cancel, Previous etc commands
o Use SCREEN type and a priority to sort low-priority commands in the menu
o In Lists: Set up a command that will be activated when pressing Select
• Note that different phones prioritize commands differently, but the above gives high
priority commands a bigger chance to be mapped to soft keys.
[Source]
• When you select the Source tab you will see the code that VMD has created.
• The blue lines are controlled by VMD, so you can't edit them directly.
T ¨ $¤'¤¥¨¤£%¨%%¨¥$$#¥!
- 5. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨ a
'’j‘iU' d‘ ’j‘iU o‘i ’n˜—¡f B˜— ™dB˜i™ o’i‘–’“d–m d‘ ’n˜—¡f B˜— w–dhnqo ’¡‘ ‘f’j’ ” “’‘
—q—eg‘’j¡ rj—¤oiB d‘˜i “d–B B˜— n—–¡ ”a “’‘
o‘˜’˜d“wd• xB ’¡‘ d‘ ’‘—niq—˜ B˜— ™dB˜i™ ’‘‘’j—m ’¡‘ ˜’“b ”T “’‘
1020)£¢)( ¡ ¦0f
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 6. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨
nqo ”’w—l ’n— f—m
Q’n— f—m —q—p k ™’l ”k’n— f—“ ‘j¤—£’B¢ fij• ‘¡niG
’n— f—“ ™’˜ BBv ”¨ “’‘
wd–hnqo –’¡‘d˜— “d–B B˜— n—–¡ ”¢ “’‘
w–dhnqo d‘ ˜di‘f’˜˜df — n—–B B˜— ¡B’‘–—‘ ˜d fijf ’fiq’¡ ’jiudr ‘f’j’
”‘–—‘o ’w—n ’¡‘ –’‘£— B’©—j“oiB w–dh ‘o–i£ ’¡‘ w–dhnqo oi¡‘ ’ —w dU ” “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 7. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨
w–d£4˜i—w ”’w—l ’jih
’jih xB ”o’“©U ’jih B˜— –’¡‘b ”o’i–dn’‘—•
Q –’¡‘b k ™’l ”’n— f—“ nqo ˜d fijf ‘¡niG
’n—wi xB ™’˜ BBv ”¡ “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 8. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨ ¢
nqogw–d£4˜i—w d‘˜i o˜d‘‘¤u d™‘ n—–¡
nqogw–d£4˜i—w d‘˜i j’u—j — “d–B B˜— n—–¡
o˜d‘‘¤B d™‘ B˜— j’u— ’˜d BBv ” “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 9. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨ ¨
˜™dB –d “¤ ow’‘i ’qdw d‘ fijf ‘¡ni– 'o‘˜’˜d“wd• xB B’)i˜ndf’G' fij•
¡Q ˜d fijf ’n—wi xB £d ’Bio ‘¡ni– ’¡‘ ˜d o’i‘–’“d–m ™’iq w–dhnqo ’¡‘ ‘f’j’
o˜d‘‘¤u B˜— j’u—j ’¡‘ £d –’B–d u—‘ ’¡‘ ’n˜—¡f dU ”—–‘s
”n˜i™djjd£ ’¡‘ ‘’n jji™ ¤d© ¨jj— ’q—o fijf§ ‘—¡‘ –’‘£v
w–dhnqo d‘ nqogw–d£4˜i—w ’¡‘ “d–B B˜— n—–B ™dB˜i™ o‘f’ed–m ’¡‘ wd–h
™’iq ¡™djh B˜— —q—eg‘’j¡ rj—¤oiB d‘ ¡f‘i™ ”D “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 10. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨ ¡
U¦¡ U ¤ UGSU
UG£ U ¤ UGSU
UX'¤£ ' ££¤WU ¤ U£ AU
UG£¥ ¤ 5¤4U ¤ U¤¨¢U
‘’‘ ’¡‘ ’n˜—¡f d‘ ™dB˜i™ o’i‘–’“d–m ’¡‘ ’oE
™’iq ¡˜’’–f d‘ ¡f‘i™ ”R “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 11. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨
”™dB˜i™ ’‘‘’j—m ’¡‘ wd–£ “d–B B˜— n—–B ©u ˜d‘‘¤B ’˜d B˜— oj’u— d™‘ BBv ”a “’‘
‘j¤o’–4’w—n ”’w—l ’jih
Q ’jih xB k ™’l ”’n— f—“ nqo ˜d fijf ‘¡ni– ™dB˜i™ o‘f’ed–m ˜
’ji£ xB –’¡‘d˜— ’‘—’–• ”T “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 12. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨ D
”˜di‘f— ’¡‘ –’‘£v
w–dhnqo d‘ nqog‘j¤o’–4’w—n “d–B B˜— n—–B ™dB˜i™ o‘f’ed–m ˜
™’iq ¡™djh B˜— —q—eg‘’j¡ rj—¤oiB d‘ ¡f‘i™
w–dhnqo ’¡‘ ¡‘i™ ’ji£ nqo ™’˜ ’¡‘ ‘f’˜˜d• ” “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 13. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨ R
U¦ §§¦5 !UU ¤ U£ AU
U£ PU ¤ U¤¨¢U
‘’‘ ’¡‘ ’n˜—¡f d‘ ™dB˜i™ o’i‘–’“d–m ’¡‘ ’oE
w–dhnqo ‘f’j’o ™’iq ¡˜’’–f d‘ ¡f‘i™ ” “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡
- 14. $¤'¤¥¨¤£%¨%%¨¥$$#¥! ¨ T
w–dhnqo d‘ ’w—n ’¡‘ wd–£ B˜— ’w—n ’¡‘ d‘ w–dhnqo wd–£ ‘f’˜˜df jj—¡o
’™ ¡fi¡™ –’‘£— B˜— ’w—n B’o—us’ji‘ ’¡‘ ’‘—’–f d‘ –’Bji¤B ’w—x ’o¤ jj—¡o ’™ ‘’’¡o u—j ‘’˜ ’¡‘ ˜
˜d‘‘¤u ¡‘is ’¡‘ ˜d n˜i fijf ©u ‘o’U
˜¤– B˜— Bji¤B ”¨ “’‘
“d–B B˜— n—–B ©u w–dhnqo d‘ ˜d‘‘¤u b o)w–dhnqo ’¡‘ ‘f’˜˜d•
“d–B B˜— n—–B ©u ’fiq’¡ ’jiudr d‘ ˜d‘‘¤B ‘is o)w–dhnqo ’¡‘ ‘f’˜˜d•
™’iq ¡™djh d‘ ¡f‘i™ ”¢ “’‘
§¨¦ ¡ £¦¤© £¦ ¨§¦ £¦¤© ¨§¦¥¤£ ¢ ¡