var GameComics =
{
    currentFrame:       null,
    numberCurrentFrame: 1,

    show: function()
    {
        if (GameComics.numberCurrentFrame > 5 || parseInt(Utils.getCookie(GAME_ID + "comics")) == 1)
        {
            //GameComics.numberCurrentFrame = 1;
            Utils.setCookie(GAME_ID + "comics", 1);
            gameState = STATE_GAME;
            createScene();

            return false;
        }

        GameComics.currentFrame = library.getSprite("frame_0" + GameComics.numberCurrentFrame);
        GameComics.currentFrame.x = getStageWidthCenter();
        GameComics.currentFrame.y = getStageHeightCenter();
        GameComics.currentFrame.scaleX = 0.01;
        GameComics.currentFrame.scaleY = 1;
        GameComics.currentFrame.onmousedown = function() { return false; };
        GameComics.currentFrame.onmouseup = function(e)
        {
            var tween = stage.createTween(
                    e.target,
                    "scaleX",
                    1,
                    0.01,
                    fps / 4,
                    Easing.linear.easeOut);

            tween.onfinish = function(e)
            {
                e.target.obj.destroy = true;
                GameComics.show();
            };
            tween.play();

            return false;
        };
        stage.addChild(GameComics.currentFrame);

        var tween = stage.createTween(GameComics.currentFrame, "scaleX", 0.01, 1, fps / 4, Easing.linear.easeOut);
        tween.play();

        GameComics.numberCurrentFrame++;
    },

    showLastFrame: function()
    {
        console.log('=====GameComics.showLastFrame()');

        GameComics.currentFrame = library.getSprite("frame_06");
        GameComics.currentFrame.x = getStageWidthCenter();
        GameComics.currentFrame.y = getStageHeightCenter();
        GameComics.currentFrame.scaleX = 0.01;
        GameComics.currentFrame.scaleY = 1;
        GameComics.currentFrame.onclick = function(e)
        {
            var tween = stage.createTween(
                    e.target,
                    "scaleX",
                    1,
                    0.01,
                    fps / 4,
                    Easing.linear.easeOut);

            tween.onfinish = function(e)
            {
                e.target.obj.destroy = true;
                gameState = STATE_CHOOSE_LEVEL;
                createScene();
                return false;
            };
            tween.play();

            return false;
        };
        stage.addChild(GameComics.currentFrame);

        var tween = stage.createTween(GameComics.currentFrame, "scaleX", 0.01, 1, fps / 4, Easing.linear.easeOut);
        tween.play();
    }

};

