SetSpriteVisible [RCBasic Doc]

## Function SetSpriteVisible(sprite, flag)

Set the sprite visible with the flAG

`isFullScreen = false
vSync = true
winWidth = 640
winHeight = 480
canViewPortX = 0
canViewPortY = 0
OpenWindow("SetSpriteVisible", winWidth, winHeight, isFullScreen, vSync)
sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
Canvas(sCanvas)
DIM eye
DIM eyeW
DIM eyeH
DIM spriteTimer : spriteTimer = Timer()
DIM spriteTimerDiff : spriteTimerDiff = 2000
eye = LoadImage("theEye.png")
GetImageSize(eye, eyeW, eyeH)
eyeSprite = CreateSprite(eye, eyeW, eyeH)
SetSpritePosition(eyeSprite, 100, 100)
While Not Key(K_ESCAPE)
If Timer() - spriteTimer > spriteTimerDiff Then
SetSpriteVisible(eyeSprite, 0) 'Set sprite visible flag to 0 or false and it will become not visible
Print ("Function Called")
End If
Update()
Wend
`

Related: SetSpriteVisible