Hi,
There's no Spacebar() command, the correct command is spacekey() Change it to the following code:
Do
sprite 1,400,400,1
sprite 2,500,500,2
hide sprite 2
if spacekey()=1 and on=0
hide sprite 1
show sprite 2
on=1
Wait 250
endif
if spacekey()=1 and on=1
show sprite 1
hide sprite 2
on=0
Wait 250
endif
sync
Loop
If there's no Wait 250, the programme will continue running, it means when the 1st sprite disappears, the 2nd sprite appears, the 1st sprite will appear immediately, and the 2nd sprite will disapear, and so on... as the loop is so fast, when the spacebar is pressed 0.1 seconds, the programme may complete 100 loops (as my computer can do arround 1000 simple loops/sec).
That's it,
Hope it help,
Bye bye,