vendredi 19 février 2016

ActionScript 3.0 remove sprite from array element

I have a question for as3.How can i remove sprite from array

    var object:Object;
    var objectArray:Array;
    var objectSprite:Sprite;

    for(...) {
        objectArray.push(object);
    }
    for(...) {
        objectSprite.graphics.drawCircle(objectArray.x, objectArray.y,objectArray.radius);
        addChild(objectSprite);
    }
    if(3 > 2) {
        objectArray.splice(object, 1);
        // how can i remove screen the object sprite and object from array
    }

Aucun commentaire:

Enregistrer un commentaire