31
Endi tugmalarga kerakli skriptlarni kiritish bilan shugullanamiz. Ustiga
“Harakatlantirish” deb yozilgan tugmalarga quyidagi skriptlarni kiritamiz:
® tugmasi ayiq nomli obyektni gorizontal 10 pikselga chapga siljitadi:
on (release) {
ayiq._x -=
10;}
® tugmasi ayiq nomli obyektni gorizontal 10 pikselga o'ngga siljitadi
on (release)
{ ayiq._x
+=10;}
® tugmasi ayiq nomli obyektni vertikal 10 pikselga yuqoriga siljitadi
on (release) { ayiq._y -=10;}
® tugmasi ayiq nomli obyektni vertikal 10 pikselga pastga siljitadi
on (release) { ayiq._y +=10;}
Ustiga “masshtab va burilish” deb izohlangan tugmalarga quyidagi
skriptlar kiritilgan:
movie clip
ni 10 pikselga kichiklashtiradi:
on (release){
ayiq._xscale -=10;//vertical bo'yicha ayiq._yscale
-=10;//gorizontal bo'yicha}