Here (please try to be polite to people who are trying to help):
rem
rem AGK Application
rem
rem Landscape App
SetDisplayAspect( 4.0/3.0 )
`Box = loadimage ("box.png")
`Sprite=createsprite (box)
Sprite=createsprite (0)
Setspritesize (Sprite, 10,10 )
Setspritephysicson (Sprite,2)
Setspriteposition (Sprite,50,80)
`Ball =loadimage("ball.png")
`Sprite2=createsprite (ball)
Sprite2=createsprite (0)
Setspritesize( Sprite2, 5,5)
Setspritephysicson (Sprite2,2)
Setspriteposition (Sprite2,50,20)
SetSpritePhysicsRestitution(Sprite2,0.8)
hit=0
Do
time# = timer()
If getspritecollision (Sprite2,Sprite)
Setspritecolor (Sprite,0,250,0,250)
hit=1
delTime# = time#+1.0 `1 second
endif
if hit=1 and time#>delTime#
Setspritephysicsoff (Sprite)
Setspritesize (Sprite,0,0)
Endif
Sync ()
Loop
This sets a "hit" variable to 1 once a collision has occured and sets a delete timer to one second later when the sprite is 'deleted'. Any reason why you are setting its size to zero rather than just deleting it?