I found the article previously but it doesn't seem to be the answer unless I'm missing something.
I don't need a custom dialog box, I want to use the existing cuteeditor insert swf/image file browser dialog, select a file and then paste custom code based on the selected file.
Exactly the same as the existing insert swf file icon except the html code inserted will be slightly different.