Hmmm, I think I would approach this a different way. If you require other form fields to be filled-in/validated before the user can upload files, then start the SWFUload with the parameter button_disabled : true
. This will make it impossible to press the button to select files and queue-up/upload files.
Then, you can set a handler on your form inputs (onchange, onkeyup, etc.) that checks the data in your form and if it checks out, then use the method: [your SWFU object].setButtonDisabled(false)
which will enable the button, and your user can now upload files.
This is the method I use to accomplish what you're after.
cancelUpload is another method on the SWFUpload object and is documented here: http://demo.swfupload.org/Documentation/#cancelUpload
Since you've tagged this as jQuery, you might be interested in the jQuery.swfupload plugin that makes like very easy for you. Check it out here: http://github.com/ifunk/swfupload-jquery-plugin
I hope this helps.