計分版

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
  }
 
 }

 

 

 

 

arrow
arrow
    全站熱搜

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