I was trying to make a scrolling sprite (controlled by the use of touch) and once I had written the script the image constantly flickered. I think its because I have called the getspritey (sprites[1]) command and the getpointery () command then constantly updated them causing the image to be constantly updated. I have tried putting them outside of the do and nothing happens. Here Is what I have written:
SetDisplayAspect( 0.60 )
//rem load images
image = loadimage ("image.png")
//rem make sprites
dim sprites[1] as integer
sprites[1] = createsprite (image)
//rem set sprites sizes
setspritesize (sprites[1],100,300)
//rem set positions
setspriteposition (sprites[1],0,-100)
do
//rem make sprite move up or down when the screen is pressed
if getpointerstate ()
a = getspritey (sprites[1])
b = getpointery ()
c = b - a
d = b + c
setspritey (sprites[1],d)
endif
Sync()
loop
can anyone help please?
kirtnicholls