計分版

for(var i:int= 0;i<8;i++){
 var romio :toy = new toy();
if(i<4){romio.y = 120
        romio.x =20+120*i}else{
     romio.y = 260
        romio.x=50+120*(i-4)  
 } 
 this.addChild(romio)
 }
bar.startDrag(true)
Mouse.hide()
bar.mouseEnabled = false
this.setChildIndex(bar,this.numChildren-1)
this.addEventListener(MouseEvent.CLICK,removeRomio)

var point = 0
function removeRomio(e:MouseEvent):void{
 var juliet = e.target
 if(this.removeChild(juliet)){
 point +=10
 this.point_txt.text = point
  }
 
 }

 

 

 

 

文章標籤
全站熱搜
創作者介紹
創作者 G妮 的頭像
G妮

Genie's Space G妮的小世界

G妮 發表在 痞客邦 留言(0) 人氣(2)