*****SOLVED**** you can look at my last post at bottom for the fix 
This is really basic. It’s a scrolling background that moves along, using 6 images. It has logic that prevents other pieces from overlapping etc. No big deal.
What I really want to do is create multiple random sets of images, and pick an image from each set to match with another set. For example, in this sample you’ll see random images flying across the screen like 1,6,3,4,2,5,3,3,4,5,2,5,6,1,4,2,3,4 etc.
Right now, it’s a single for loop that goes through 6 images. Let’s say I had 12 images, and I wanted to pick images from 1 through 6, from the first set, then an image from 7 through 12 at random, then put the two together.
So a number is picked from first set - a 3. Then the second set a number is picked, lets say 7
so on screen I would want to have it scroll [3][7] , I don’t want to select from a random number from 1 to 12 - if that was the case I could just change my code’s for loop for r = 1,12 do and be done with it. I need a way to get the data from different areas and string them together like I’m already doing in this example.
I’m sitting here trying to explain it. Hopefully it makes some what sense. For those of you who are looking for some scrolling code, here you go. Some of it is borrowed from all over the place but provided a good jump off point for me.
Here is the lua code
--takes away the display bar at the top of the screen display.setStatusBar(display.HiddenStatusBar) math.randomseed( os.time() ) -- placeholder for future use. --Shortcut vars for width and height. local \_W = display.contentWidth local \_H = display.contentHeight --Create display group(s) local roads = display.newGroup() local hillPosition = 1220 -- the Y position of the roads local groundLevel = hillPosition local speed = 10 --adjust this to speed up slow down scrolling. --for loop to generate the road pieces for r = 1, 10 do --make sure if you change 1, # - # being the number, you have to change --specifically here \> newX = (roads[#]).x + 100 - speed --Notice in this example it's 10, and in the updateRoads () it's also 10. roadComplete = false local randomNumberGen = math.random(6) -- this isn't perfect, it chooses a random set of numbers and will use the same set over -- and over again. have to incorporate randomSeed into the mix to truly get this to work. --remember if you change math.random(#) this should match the # of images you have. if(randomNumberGen == 1 and roadComplete == false) then newRoad = display.newImageRect("ground1.png", 100,100) roadComplete = true end if(randomNumberGen == 2 and roadComplete == false) then newRoad = display.newImageRect("ground2.png", 100,100) roadComplete = true end if(randomNumberGen == 3 and roadComplete == false) then newRoad = display.newImageRect("ground3.png", 100,100) roadComplete = true end if(randomNumberGen == 4 and roadComplete == false) then newRoad = display.newImageRect("ground4.png", 100,100) roadComplete = true end if(randomNumberGen == 5 and roadComplete == false) then newRoad = display.newImageRect("ground5.png", 100,100) roadComplete = true end if(randomNumberGen == 6 and roadComplete == false) then newRoad = display.newImageRect("ground6.png", 100,100) roadComplete = true end --Give the road pieces a name newRoad.name = ("roadPiece" .. r) newRoad.x = (r \* 100) - 100 newRoad.y = groundLevel roads:insert(newRoad) end local function update( event ) updateroads() end function updateroads() for r = 1, roads.numChildren, 1 do if(r \> 1) then newX = (roads[r - 1]).x + 100 else newX = (roads[10]).x + 100 - speed end if((roads[r]).x \< 300) then (roads[r]).x, (roads[r]).y = newX, (roads[r]).y else (roads[r]):translate(speed \* -1, 0) end end end timer.performWithDelay(1, update, -1) --Memory check - use this to test for leaks between reloads, retrys, exits etc. function checkMemory() collectgarbage( "collect" ) local memUsage\_str = string.format( "MEMORY = %.3f KB", collectgarbage( "count" ) ) print( memUsage\_str, "TEXTURE KB= "..(system.getInfo("textureMemoryUsed") / (1024 \* 1024)) ) end timer.performWithDelay( 100, checkMemory, 0 )