DiabloB.addEventListener(MouseEvent.CLICK,Elegir1)
this.addEventListener(Event.ENTER_FRAME, Caida)
function Caida(e: Event) {
T++
if (T == 10) {
T = (Math.random() * 4 + 1)
//this is the random IMG "Personaje 1, Personaje 2 , Personaje 3 , Personaje 4"
refClass = getDefinitionByName("Personaje " + T) as Class;
ref = new refClass()
ref.y = -250
addChild(ref)
T = -500
enemigos.push(ref)
trace(enemigos.length)
setTimeout(function () {
removeChild(ref);
}, 20500);
}
}
// this is the button
function Elegir1(e: MouseEvent) {
}
Aucun commentaire:
Enregistrer un commentaire