You can look at Binding (if it's Flex App) or flash.utils.Proxy class... You
can watch variable and do whatever you want..
-abdul
pretend we have a custom
> component with the code below. The langType variable is bound to
> another variable in the main application, and I want it to run the
> changeLangTxt function whenever the langType variable changes. How do
> I do this?
>
> var langType:String = new String("english");
> var helloMsg:String;
>
> private function changeLangTxt():void{
> if(langType == "spanish"){
> helloMsg = "Hola"l
> }
> if(langType == "english"){
> helloMsg = "Hi There"l
> }
> }
>
>
>
--
-abdul
---------------------------------------
http://abdulqabiz.com/blog/
---------------------------------------