title: How to Move Objects in Fixed Distance in Corona SDK
body: <p>I want to move the Object in x axis for Fixed Distance . say I have object sprite, I have Placed in Scene . my Requirement is i want to move the Object for X to Some -X and -X to X.</p>
  
  <pre><code>function scrollBackgroundImages(self, event)
      if self.x &lt; -477 then
          self.x = 480
          else
          self.x = self.x - self.speed
      end
  end
  
  backgroundImage1 = display.newImage("goldfish-background-01.png", 768, 1024)
      backgroundImage1:setReferencePoint(display.BottomLeftReferencePoint)
      backgroundImage1.x = 0
      backgroundImage1.y = 320
      backgroundImage1.speed = 1
      screenGroup:insert(backgroundImage1)
  
  
  
  carbSpritesheetData = { width=216, height=167, numFrames=3, sheetContentWidth=650, sheetContentHeight=167 }
          mycrabSheet = graphics.newImageSheet( "crab-sprite.png", carbSpritesheetData )
          crabSequenceData = {
          { 
              name = "normalRun", start=1, count=3, time=800}
          }
          crabMoving = display.newSprite( mycrabSheet, crabSequenceData )
          crabMoving:play()
          crabMoving:scale(0.3, 0.3)
          crabMoving.x =_W/2
          crabMoving.y = _H-55
          crabMoving.speed = 1
          physics.addBody(crabMoving, "static", {density = 0.1, bounce = 0.1, friction = 0.2, radius = 12})
          screenGroup:insert(crabMoving)
  
  
      crabMoving.enterFrame = scrollBackgroundImages
          Runtime:addEventListener("enterFrame",crabMoving )
  </code></pre>