2 Replies Latest reply on Feb 3, 2012 1:41 AM by Indukrishna

    Endless background in HTML5+LimeJS

    Indukrishna

      Hai all,

       

       

          We are developing a game in html5 using limejs. We need an endless background . How can we acheive this?

        • 1. Re: Endless background in HTML5+LimeJS
          mytaxsite.co.uk Level 6

          Indukrishna wrote:

           

          Hai all,

           

           

              We are developing a game in html5 using limejs. We need an endless background . How can we acheive this?

           

          what do you mean by endless background?  Do you want the same background image on your entire page?  If so then something like this will work:

           

           

          body {

              background-image: url('06-tmp-b.jpg');

          }

           

          The default in the above code is to repeat the image both ways - vertically and horizontally.  If you want to repeat the image only horizontally or vertically then select the code from this:

           

           

          background-repeat: repeat-x;
          background-repeat: repeat-y;

           

           

          Hope this gives you an idea what to do.

           

          Good luck.

          • 2. Re: Endless background in HTML5+LimeJS
            Indukrishna Level 1

            Hai JTANNA,

             

             

                      thanx................We are  developing a car race in limejs. We need an endless road

             

            We coded like this.....




            for(var i=1; i<150;i++)



            {



            var image
            =new lime.Sprite().setPosition(500,450-(150*i)).setSize(555,152).setFill('road.jpg');



            target.appendChild(image);



            }

            Is this the right way ?

             

             

            We want to turn the car when "RIGHT and UP " arrow pressed together.