Quantcast
Channel: iT邦幫忙
Viewing all articles
Browse latest Browse all 15645

flash as3.0問題

$
0
0
各位大大能幫我看我哪裡有問題嗎?

我寫一個當A物碰到B物,那個生命值3會減少
life_txt(是我動態文字的3)
girl_mc(是我的A物)
slo1_mc(是我的B物)


var life_txt:String= "3";
var a=int(life_txt);

girl_mc.addEventListener(Event.ENTER_FRAME,deheart);

function deheart (e:Event):void{
if(girl_mc.hitTestObject(slo1_mc)){


a--;
}

謝謝大大!!!

Viewing all articles
Browse latest Browse all 15645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>