views:

43

answers:

1

Hello,

I have an application that sometimes has a HTML control. If I remove the html control and click outside the app and then back on again. I get an error.

TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.core::FlexHTMLLoader/setFocus()[C:\autobuild\3.5.0\frameworks\projects\airframework\src\mx\core\FlexHTMLLoader.as:175] at mx.managers::FocusManager/activateHandler()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\FocusManager.as:629]

Its as if the app is trying to setFocus on my html component even though I have removed it. I have tried mouseFocusEnabled="false" focusEnabled="false" to try stop this but no joy.

Any ideas?

A: 

Ok I solved this one by calling focusManager.deactivate(); I do not need mouse interaction on this app anyway.

Neil