Hi Everybody, I have an "options" button which leads to a new sate "options_state" when it is clicked. In this new state, I have a checkbox and two buttons "cancel" and "valid". I handle fine the "valid" button which gets the checkbox state and save it, to display it again when the application is relaunched.
Now my problem is if I change my checkbox state, then change my mind, I can do "cancel", but I don't see how anymore after tried several ways of doin' it... Sorry for sounding kind of basic... :-( With a little help from my friends... Thx for the Light ! here is the snippet of code: private function onOptions():void { this.currentState = "options_state"; setOptions(); } // to handle the prefs when app is launched private function setOptions():void { if ( Flags.flag_startAtLogin == 0 ) { checkbox_options.selected = true; } checkbox_options.addEventListener( Event.CHANGE, checkOptions ); } private function checkOptions( evt:Event ):void { if ( checkbox_options.selected == false ) { flag.setFlag( 1 ); checkbox_options.selected = false; //NativeApplication.nativeApplication.startAtLogin = false; } else { flag.setFlag( 0 ); //NativeApplication.nativeApplication.startAtLogin = true; } } private function onValider():void { savePreferences.createXMLData(); savePreferences.writeXMLData(); this.currentState = ""; } private function onAnnuler():void { this.currentState = ""; }