Changin js syntax to createjs