src/renderable/sprite.js
function (duration, callback) {
            this._flicker.duration = duration;
            if (this._flicker.duration <= 0) {
                this._flicker.isFlickering = false;
                this._flicker.callback = null;
            }
            else if (!this._flicker.isFlickering) {
                this._flicker.callback = callback;
                this._flicker.isFlickering = true;
            }
            return this;
        }
function (duration, callback) {
            this._flicker.duration = duration;
            if (this._flicker.duration <= 0) {
                this._flicker.isFlickering = false;
                this._flicker.callback = null;
            }
            else if (!this._flicker.isFlickering) {
                this._flicker.callback = callback;
                this._flicker.isFlickering = true;
            }
            return this;
        }
function ( duration , callback ) { this . _flicker . duration = duration ; if ( this . _flicker . duration <= 0 ) { this . _flicker . isFlickering = false ; this . _flicker . callback = null ; } else if ( ! this . _flicker . isFlickering ) { this . _flicker . callback = callback ; this . _flicker . isFlickering = true ; } return this ; }
make the object flicker
@name flicker
@memberOf me.Sprite.prototype
@function
@param {Number} duration expressed in milliseconds
@param {Function} callback Function to call when flickering ends
@return {me.Sprite} Reference to this object for method chaining
@example
// make the object flicker for 1 second
// and then remove it
this.flicker(1000, function () {
me.game.world.removeChild(this);
});
make the object flicker