Hi i'm having problem to display image using easeljs. Can someone help? the code below is not displaying anything.

<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="lib/easeljs-0.5.0.min.js"></script>
    <script>
        var stage;
        var canvas;
        var img;
        function init()
        {
            canvas = document.getElementById("canvas");
            stage = new createjs.Stage(canvas);

            img = new Image();
            img.src="images/test.png";


            stage.addChild(img);
            stage.update(); 
        }



    </script>
</head>
<body onload="init">
    <canvas id="canvas" width="1600" height="800"></canvas>
</body>
</html>

Line 12, shouldn't it be...

stage = new Stage(canvas);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.