Custom UI - Kill Focus - Flash Authoring Environment?

I am creating a Custom UI because my component has an upwards of 30+ variables. Eeek!

I’ve already created the Custom UI. Everything works fine… except…

When you click off the custom UI to any place on the flash authoring environment, the variables do not actually get “set.”

I set them up so that onKillFocus they call a function that updates the xch object.
For example this is a bit of the code within a movie clip.
It detects when the textInput box named “id” has its focus changed.

[color=Green]id.onKillFocus = function(obj) {
//////passes two variables to the function
/////1 name of component variable to be updated
/////2 the value to be updated
_root.updateVariable(“textId”, id.text);
};

////this function is on _root

updateVariable = function (nameOfVariable, newValueForVariable) {
_root.xch[nameOfVariable] = newValueForVariable;
};[/color]

It works fine, but it only works within the custom UI swf. Blaah!

It doesn’t really feel intuitive to click on the custom ui, then continue about your work on the stage.

**[color=Red]Is there a way to detect when your mouse clicks on somthing outside of the swf?

Or better yet, just leave the swf???

Is there a “onKillFocus” of sorts for the entire movie.
[/color]**
If so, I could then set that up as the event that would call my updateVariable function that updates my xch object.