QuickTime Player giving Invalid Index

I am having strange happenings with a script, which worked once, then keeps giving me Invalid Index errors:


set theFile to ((path to desktop as text) & "filename.mov")

tell application "QuickTime Player"
activate
open theFile

set looping of document 1 to true
set presenting of document 1 to true

play document 1

end tell


any ideas?