Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
   var stage = new Kinetic.Stage({
    container: 'container',
    width: 490,
    height: 300,
  var layer = new Kinetic.Layer();

I want to make a default image to a stage to be the background of the stage. i'm using kineticjs .

share|improve this question
I have no experience with Kinetic, but to help others answer: What have you tried? What's a "default image"? – Anko Jan 3 '13 at 0:57
my default image in 490*300 i add it using css but i don't want that i want to draw on the stage using kinetic – Mohamed Hassan Jan 3 '13 at 9:46

There are two ways to do this: 1. Assign a background image to the div container using CSS. 2. Create a background layer and add an image that takes up the whole layer.

An example of (2) might be:

var background = new Kinetic.Layer();
var bgImage = new Kinetic.Image(...);

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.