        var canvas;
        var stage;
       
        function rysowanie() {

            canvas = document.getElementById("element_canvas");
            stage = new createjs.Stage(canvas);
            
            var kontekst_renderowania = canvas.getContext('2d');          
            
            var element_1 = new createjs.Graphics();
            element_1.setStrokeStyle(3);
            element_1.beginStroke(createjs.Graphics.getRGB(255,0,0));
            element_1.beginFill(createjs.Graphics.getRGB(255,255,0));
            element_1.drawCircle(1,1,60);
            

            var element_3 = new createjs.Shape(element_1);
            element_3.x = 120;
            element_3.y = 300;

            stage.addChild(element_3);
            stage.update();
                       
            var element_2 = new createjs.Shape();
            element_2.graphics.setStrokeStyle(5, 'miter', 'miter');
            element_2.graphics.beginStroke(('#FF0000'));
            element_2.graphics.beginFill("#FFFF00").drawPolyStar(3, 3, 50, 25, 0.6, 100);
            element_2.graphics.endStroke();
            element_2.graphics.endFill();
            
            stage.addChild(element_2);
            
            var tween = createjs.Tween.get(element_2, {loop:true})
                         .to({x:canvas.x, y:canvas.height - 55, rotation:-360}, 1500, createjs.Ease.bounceOut)
                         .wait(1000)
                         .to({x:canvas.width-55, rotation:360}, 2500, createjs.Ease.bounceOut)
                         .wait(1000).call(start)
                         .to({scaleX:6, scaleY:6, x:canvas.width - 160, y:canvas.height-160}, 2500, createjs.Ease.bounceOut)
                         .wait(1000)
                         .to({scaleX:.5, scaleY:.5, x:30, rotation:-360, y:canvas.height-30}, 2500, createjs.Ease.bounceOut)
                         .wait(3000);
                         
  
            var tween = createjs.Tween.get(element_3, {loop:true})
                         .to({x:canvas.x, y:canvas.height - 55, rotation:-360}, 1500, createjs.Ease.bounceOut)
                         .wait(1000)
                         .to({x:canvas.width-55, rotation:360}, 2500, createjs.Ease.bounceOut)
                         .wait(1000).call(start)
                         .to({scaleX:6, scaleY:6, x:canvas.width - 110, y:canvas.height-110}, 2500, createjs.Ease.bounceOut)
                         .wait(1000)
                         .to({scaleX:.5, scaleY:.5, x:30, rotation:-360, y:canvas.height-30}, 2500, createjs.Ease.bounceOut)
                         .wait(3000);

			createjs.Ticker.addEventListener("tick", stage);
        }

        function start(tween) {
            var element = tween._target;

        }
        