Hi,
I've happened to post something along these lines in the Photoshop forum - I've troubles with dispatchEvent() and a particular component.
If you're willing to spread your knowledge there too, the thread is this one: http://forums.adobe.com/message/5547956#5547956
Thank you!
Davide