Container Flex



    
    
    import mx.managers.HistoryManager;
    public function loadState(state:Object):void {
       if (state) {
           currentState = state.currentState;
           searchString = searchInput.text = state.searchString;
       }else {
           currentState = '';
       }
    }
    public function saveState():Object {
       var state:Object = {};
       state.currentState = currentState;
       state.searchString = searchString;
       return state;
    }
    [Bindable]
    public var searchString:String;
    public function doSearch():void {
        currentState = "results";
    }
    public function reset():void {
        currentState = '';
    }