Difference between revisions of "SpriteDisplay.scrollX"
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
		
		
		
		
		
	
ZachStrout (talk | contribs)  | 
				ZachStrout (talk | contribs)   | 
				||
| Line 2: | Line 2: | ||
sprites on the display.  This is the standard way of making it  | sprites on the display.  This is the standard way of making it  | ||
appear that the world is scrolling past.  | appear that the world is scrolling past.  | ||
| + | |||
| + | See also: [[SpriteDisplay.scrollY]]; [[PixelDisplay.ScrollX]]; [[TileDisplay.ScrollX]]  | ||
== Example ==  | == Example ==  | ||
Revision as of 21:35, 12 April 2020
SpriteDisplay.scrollX: Horizontal scroll amount subtracted from the position of all
sprites on the display.  This is the standard way of making it
appear that the world is scrolling past.
See also: SpriteDisplay.scrollY; PixelDisplay.ScrollX; TileDisplay.ScrollX
Example
sp = new Sprite
sp.image = file.loadImage("/sys/pics/Wumpus.png")
display(4).sprites.push sp
for i in range(0,500,10)
    display(4).scrollX = -i
    wait 0.2
end for