I decided to move the code to the creationcomplete event and watch that for a while.
But other suggestions are welcomed.
I had the same error while trying to load resource modules from a remote domain. If you had the same problem as I, it boils down to a problem with the security features of Flex.
I was able to solve it by always running and debuggging from localhost. As long as you follow the steps listed here: http://www.flexafterdark.com/docs/Flex-Modules Look at the section titled: "Loading Modules across domain"
But if you don't want to always load from localhost, there is another way to get around this error. See the blog post I made on this subject. http://blog.mediarain.com/2009/08/flex-loading-remote-modules-throws-the-following-error-u nable-to-load-resource-module-from/
Either of these approaches should hopefully solve your problem.