CreateJS rebote

<!DOCTYPE html>
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src=""></script>
var pos = 50, circle,cuadrado,bitmap,incX=5,incY=5;

function dibujar() {
stage = new createjs.Stage("lienzo");
//Create a Shape DisplayObject.
circle = new createjs.Shape();"#00FF00").drawCircle(50, 50, 100);
//Set position of Shape instance.
circle.x = 50;
circle.y = 100;
circle.shadow=new createjs.Shadow("#000000", 5, 5, 10);
//Update stage will render next frame
function mover() {
circle.y +=incY;
if (circle.x<50) incX=5;
if (circle.y<50) incY=5;
if (circle.x>650) incX=-5;
if (circle.y>450) incY=-5;


createjs.Ticker.addEventListener("tick", mover);

<body onload="dibujar()">

<canvas style="border:solid" id="lienzo" width="800" height="600"></canvas>