Unfortunately...I haven't found any solution for your problem. However, you should be aware that code-behinds may not be ideal in situations; read this discussion I had with Cliff (project owner/lead of PureMVC).
Probably a better approach will be to use an MVC pattern in Flex, the code behind works well for MS techs but there are a lot of frameworks out there for Flex. That red box usually means that FB couldn't instantiate your component, are you getting any compiler error?
I have no problem with compiler. The App runs and works fine
Is MVC approach compatible with design mode?
Can you point me to some good MVC framework? Maybe PureMVC?