Your best bet is to use the Scancode() and Keystate() functions which will return the current key pressed and test to see if a particular key is being pressed respectively.
For example:
Pressing the "w" key whilst scancode() is called would return "17".
Pressing the "w" key whilst keystate(17) is called would return "1".
In this manner we can check to see when our chosen keys are being pressed. Here's a modified version of your own code that's had the default up/down/left/right keys replaced with W/A/S/D:
cls
sync on
sync rate 30
load image "sprite1.bmp",5
create animated sprite 10,"sprite1.bmp",2,1,5
vSpriteX=100
vSpriteY=100
do
sprite 10,vSpriteX,vSpriteY,5
play sprite 10,1,2,100
` S key = 31
if keystate(31)=1 then vSpriteY=vSpriteY+8
` W key = 17
if keystate(17)=1 then vSpriteY=vSpriteY-8
` A key = 30
if keystate(30)=1 then vSpriteX=vSpriteX-8
` D key = 32
if keystate(32)=1 then vSpriteX=vSpriteX+8
sync
loop
Just play around with the commands to get the hang of it (not that it's that hard hehe)
Towards the bottom of TGC newsletter 57 is an article you may want to read up on, since it goes over this topic and has a handy scancode map. Here's a link:
http://www.thegamecreators.com/data/newsletter/newsletter_issue_57.html
Hope it helps!!!