his requires using the Terminal app, in your Applications/Utilities folder
To turn off Time Machine snapshots type in the following command:
sudo tmutil enablelocal
The Mac will likely ask for your password, so type it in and hit the return key. The type the word, exit and hit return. Quit Terminal.
It's a toggle switch you can enable and disable at any time as needed.
It's not so much when Time Machine is running, it's constantly doing it in the background when it sees a file 'changing' and when you are using iMovie files are changing constantly being written into the Local Backup. But you only see the end result of this 'conflict' when you issue any command from the Share Menu (export/sharing).
The same effect could be accomplished by temprorarily turning off Time Machine as has been mentioned by other contributors on the iMovie Discussion Group. If you Eject the external drive, you might have to open Disk Utility to remount the drive. So I think turning off Time Machine might be more straight forward. But if you want the extra insurance of not having any 'external' devices grabbing the attention of iMovie or interrupting it while exporting, by all means please do eject the drive. That will take one more variable out of the Export Failure Equation.