screen.resolution.set (512,384)
screen.set (BACK)
pattern.display ("avo\bubble.gif")
screen.end ()
@icon = icon.load ("avo\dinosaur.png")
icon.display (@icon,CENTER,CENTER)
screen.set (FRONT)
text.display ("Press a key to set the persistence of the icon.",CENTER,10)
text.color.stack (COLOR_RED)
text.display ("Press ESCAPE to exit.",CENTER,350)
screen.end ()
repeat ()
!angle+=1.5
icon.position.set (@icon,200+80*number.sin.get (!angle),100+80*number.cos.get (!angle))
if (keyboard.get ())
keyboard.set (OFF)
%i+=1
switch (%i mod 3)
case (0)
icon.persistence.set (@icon,OFF)
case (1)
icon.persistence.set (@icon,ON)
case (2)
icon.persistence.set (@icon,PERSISTENCE_TRAILS)
end switch ()
screen.set (FRONT)
switch (icon.persistence.get (@icon))
case (OFF)
text.display ("The persistence of the icon is : OFF ",CENTER,30)
case (ON)
text.display ("The persistence of the icon is : ON ",CENTER,30)
case (PERSISTENCE_TRAILS)
text.display ("The persistence of the icon is : TRAILS",CENTER,30)
end switch ()
screen.end ()
endif ()
time.wait (0.005)
until (keyboard.get ()==KEY_ESCAPE)
script.stop ()