Hey all I just uploaded some new code to my website for a continuous scrolling background class. As always i have a free version and a paid version. The free version is just some code where you give the image filenames and set a speed and it ready to go. The paid version lets you create multiple backgrounds using one or multiple images with methods to adjust speed, direction, tint, visibility, & start/stop. Check it out! www.j-strahan.com
video coming soon. [import]uid: 7911 topic_id: 21432 reply_id: 321432[/import]
Hey J
I am trying to make your module work with director class. I have done the following to add each element of the table to add them to a localGroup so it will work with director.
layer2 = scroll.newList( {“layer2img1”,“layer2img2”}, “down”, 8 )
layer2:show()
layer2:start()
localGroup:insert(layer2[1])
localGroup:insert(layer2[2])
layer1 = scroll.newList( {“layer1img1”}, “down”, 5 )
layer1:show()
layer1:start()
localGroup:insert(layer1[1])
then on my gameover method I want to remove the background from memory so I can jump to the next scene. So in my gameover method I have this.
local function gameOver()
layer1:clean()
layer2:clean()
end
And i get the following error once I am at my new scene:
scroll.lua:48: attempt to call method ‘translate’ (a nil value)
The clean method only works with layer1. So if I remove layer2 from the game and call a clean method it works okey but once I add move layers or more backgrounds the clean method only works for one background.
Any idea why this is happening?
Thanks
Steve
[import]uid: 111657 topic_id: 21432 reply_id: 85322[/import]