Game Development Reference
In-Depth Information
3. Convert the hill into a symbol. Select the graphic with the Selection Tool and then select Modify °
Convert to Symbol . Give the new symbol the class name Dehh.
4. Give the new hill object the instance name hill in the Instance name box of the Properties
panel.
5. You'll add a new dynamic text field to test how depPaopLkejp is working. Create a new dynamic
text field in the upper part of the stage and give it the instance name collisionDisplay . Figure 7-27
shows how I set mine up.
Figure 7-27. Add a new dynamic text field called collisionDisplay.
6. Save the ejpan]_peraLh]ucnkqj`*bh] file.
7. Open the I]ej[Lh]ucnkqj`*]o file. Add the following code in bold to the kjAjpanBn]ia event
handler:
bqj_pekjkjAjpanBn]ia$arajp6Arajp%6rke`
w
++Ikrapdalh]uan
lh]uan*t'9rt7
lh]uan*u'9ru7
++?khheoekj`apa_pekj
eb$lh]uan*depPaopK^fa_p$ajaiu%%
w
ajaiu*ckpk=j`Opkl$.%7
da]hpd*iapan*se`pd))7
eb$_khheoekjD]oK__qnna`%
w
 
Search Nedrilad ::




Custom Search