Game Development Reference
In-Depth Information
You now have a two-eyed cat that contains two independent eye instances: habpAua and necdpAua.
You can now control these eyes with code. Figure 4-15 shows an example of what you created.
Figure 4-15. Give the eyes instance names.
Next you need to create a Look button and add some new code to the program to make it work.
1. Create a new button called Hkkg>qppkj.
2. Drag an instance of the Hkkg>qppkj onto the buttons layer of the DehhL]ca symbol. Give it the
instance name lookButton .
3. Add or modify the following code in bold to the I]ej*]o file:
l]_g]ca
w
eilknpbh]od*`eolh]u*Ikrea?hel7
eilknpbh]od*arajpo*IkqoaArajp7
lq^he__h]ooI]ejatpaj`oIkrea?hel
w
r]nop]npL]ca6Op]npL]ca7
r]ndehhL]ca6DehhL]ca7
r]nlkj`L]ca6Lkj`L]ca7
lq^he_bqj_pekjI]ej$%
w
op]npL]ca9jasOp]npL]ca$%7
dehhL]ca9jasDehhL]ca$%7
lkj`L]ca9jasLkj`L]ca$%7
]``?deh`$dehhL]ca%7
++=``arajpheopajano
op]npL]ca*dehh>qppkj*]``ArajpHeopajan$IkqoaArajp*?HE?G( ±
kjDehh>qppkj?he_g%7
op]npL]ca*lkj`>qppkj*]``ArajpHeopajan$IkqoaArajp*?HE?G( ±
 
Search Nedrilad ::




Custom Search