Where you actually place the dispatchEvent line of code requires some consideration. Typically, it should be the last line of code of the method in which it is written. This is so that any other code that also runs in that method can set properties or otherwise update the internal state of the object. By dispatching after this internal update is complete, the object is in a "clean" state at the time of the dispatch.
Consider, for example, our working example. Let's say the COMPLETE event is all about the processing of some data; a bunch of data so large that it will take several seconds to completely process, so the object's purpose is to handle the processing asynchronously so as not to block the UI. And we're dispatching the COMPLETE event as a way of saying that the data has been processed.