I am trying to use this as a droplet to export some pics to jpeg format, can anyone tell me what is wrong and help me fix it, or possibly change it into a folderaction?

on open (itemList)
   repeat with x from 1 to the number of items in itemListcopy
      set item x of itemList to fileName
      tell application "QuickTime Player"
         export fileName as picture using settings preset "Photo-JPEG"
      end tell
   end repeat
end open