by simo103This is a demo for creating a scrolling background with parallax. I'm a noob so if any Chefs see anything wrong (or better ways to do things) please let me know.
Notes: I created three speed attributes .. mountains, hills and trees and set their speed separately. I had tried one speed attribute and then set the tree speed as a multiple of the mountain speed for example but it ran a little jerky so I did the three attributes and it seems smoother).
About the code ... the images move across the scene and spawn a new one on the right and destroy the old one on the left.
Hope its helpful to someone. learn moreNovember 12, 2010
Play Online