Help with making sketch for arduino velleman audio shield

Hi all,

I’m quit new in this… Can anybody help me making a sketch for the audio shield?
I’ve replaced the play switch for a tilt or accelerator switch ( when the arduino is turned around the sound files are played)
now I want to edit the sketch so that if the entire sound file is played it will automatically be erased…
thanks in advance for your reply

cheers