計分版
for(var i:int= 0;i
var romio :toy = new toy();
if(i
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
}
}

全站熱搜