With time the Downloads folder gets filled with a variety of items. In order to clear it using the dock, items have to be dragged to the Trash individually [crarko adds: or you can navigate to the folder in Finder, do a 'Select All' and trash them]. Here is a tiny AppleScript that presents an alternative.
Run AppleScript Editor and copy and paste the following code. You'll have to change the path to match your username using AppleScript Editor. Next, save it as an application named 'Clear Downloads' into your Downloads folder. Feel free to add a custom icon if you wish. To test, just click your downloads stack on the dock and select 'Clear Downloads.'
Here's the script:
try
tell application "Finder"
move (files of alias "Macintosh HD:Users:YOURUSERNAMEGOESHERE:Downloads" whose name is not "Clear Downloads.app") to trash
end tell
on error -- oops, couldn't move the file
display dialog ("Error") buttons {"OK"}
end try
Mac OS X Hints
http://hints.macworld.com/article.php?story=2011041611142641