Disabling buttons?

http://www.kirupa.com/developer/mx2004/xml_slideshow.htm

Can anyone help me how I could disable previous button in the first image and the next button in the last image??