Well, it would appear that I spoke a bit too soon. I’m still having issues with the scrolling background. Here’s the code that I’m using now [code]local function move(event)
local tDelta = event.time - tPrevious
tPrevious = event.time
------Speed and direction (changing the “xOffset” changes the speed of that layer)
local xOffset = ( 0.13 * tDelta )
moon.x = moon.x - xOffset*0.0
------houses
fog.x = fog.x - xOffset*2
fog2.x = fog2.x - xOffset*2
-----back mountain
mountain_big.x = mountain_big.x - xOffset*0.1
mountain_big2.x = mountain_big2.x - xOffset*0.1
----front mountain
mountain_sma.x = mountain_sma.x - xOffset*0.5
mountain_sma2.x = mountain_sma2.x - xOffset*0.5
-----upper trees
tree_s.x = tree_s.x - xOffset*0.6
tree_s2.x = tree_s2.x - xOffset*0.8
tree_s3.x = tree_s3.x ±xOffset*0.7
tree_s4.x = tree_s4.x - xOffset*0.8
tree_s5.x = tree_s5.x - xOffset*0.7
tree_s6.x = tree_s6.x - xOffset*0.8
-------chimmeny detectors
tree_D.x = tree_D.x - xOffset*2
tree_D2.x = tree_D2.x - xOffset*2
tree_D3.x = tree_D3.x - xOffset*2
tree_D4.x = tree_D4.x - xOffset*2
tree_D5.x = tree_D5.x - xOffset*2
tree_D6.x = tree_D6.x - xOffset*2
----lower trees
tree_l.x = tree_l.x - xOffset*1
tree_l2.x = tree_l2.x - xOffset*1.2
tree_l3.x = tree_l3.x - xOffset*1.2
------Forground trees (now transparent)
tree_l_sugi.x = tree_l_sugi.x - xOffset * 1.5
tree_l_take.x = tree_l_take.x - xOffset * 1.5
—Seamless Linking (change the values so they match up with your image size)
-----moon
if moon.x < -480 + moon.width / 2 then
moon:translate ( 480*2 , 0)
-------houses
end
if fog.x < -1920 + fog.width / 2 then
fog:translate( 1920 * 2, 0)
end
if fog2.x < -1920 + fog2.width / 2 then
fog2:translate( 1920 * 2, 0)
end
------back mountain
if mountain_big.x < -480 + mountain_big.width / 2 then
mountain_big:translate(480*2 , 0)
end
if mountain_big2.x < -480 + mountain_big2.width / 2 then
mountain_big2:translate(480*2 , 0)
end
------front mountain
if mountain_sma.x < -480 + mountain_sma.width / 2 then
mountain_sma:translate(480*2,0)
end
if mountain_sma2.x < -480 + mountain_sma2.width / 2 then
mountain_sma2:translate(480*2,0)
end
-------upper trees
if tree_s.x < -480 + tree_s.width / 2 then
tree_s:translate(480*2 , 0)
end
if tree_s2.x < -480 + tree_s2.width / 2 then
tree_s2:translate(480*2 , 0)
end
if tree_s3.x < -480 + tree_s3.width / 2 then
tree_s3:translate(480*2 , 0)
end
if tree_s4.x < -480 + tree_s4.width / 2 then
tree_s4:translate(480*2 , 0)
end
if tree_s5.x < -480 + tree_s5.width / 2 then
tree_s5:translate(480*2 , 0)
end
if tree_s6.x < -480 + tree_s6.width / 2 then
tree_s6:translate(480*2 , 0)
end
---------Chimmeny detectors
if tree_D.x < -960 + tree_D.width / 2 then
tree_D:translate(960*2 , 0)
end
if tree_D2.x < -960 + tree_D2.width / 2 then
tree_D2:translate(960*2 , 0)
end
if tree_D3.x < -960 + tree_D3.width / 2 then
tree_D3:translate(960*2 , 0)
end
if tree_D4.x < -960 + tree_D4.width / 2 then
tree_D4:translate(960*2 , 0)
end
if tree_D5.x < -960 + tree_D5.width / 2 then
tree_D5:translate(960*2 , 0)
end
if tree_D6.x < -960 + tree_D6.width / 2 then
tree_D6:translate(960*2 , 0)
end
-------lower trees
if tree_l.x < -480 + tree_l.width / 2 then
tree_l:translate(480*2 , 0)
end
if tree_l2.x < -480 + tree_l2.width / 2 then
tree_l2:translate(480*2 , 0)
end
if tree_l3.x < -480 + tree_l3.width / 2 then
tree_l3:translate(480*2 , 0)
end
--------forground trees (now transparent)
if tree_l_sugi.x < -480 + tree_l_sugi.width / 2 then
tree_l_sugi:translate(480*4,0)
end
if tree_l_take.x < -480 + tree_l_take.width / 2 then
tree_l_take:translate(480*5,0)
end
end
local function moveTmr (event)
timer.performWithDelay( 1, move )
end
Runtime:addEventListener(“enterFrame”,moveTmr) [import]uid: 66329 topic_id: 19160 reply_id: 73928[/import]