// state management and back/forward browser button functionality // v 0.8 // 2005-08-20 // leo@blixtsystems.com // Part of statemanagement system for flash // Full package available at: // http://www.blixtsystems.com/index.html?page=downloads&pid=7&ss=pid // Licensed under GNU GPL, see license.txt included with package for details // create object to hold the state information _global.state_obj = new Object(); if(queryStr && queryStr != "undefined"){ state_obj= str2Object(queryStr); } // check that the page specified exists //getURL("javascript:loadPage('"+page+"');"); var valid=false; for (var i in page_array) { if (page == page_array[i]) { valid = true; } } // if the request is not for a valid page goto first page if (!valid) { page = page_array[0]; state_obj.page = page; } // function called when pressing a nav button _global.gotoPage = function(p) { // update the page var page = p; // update state object state_obj=new Object(); state_obj.page = p; pollCount=0; updateState(); oldpage=p; // go to the page goState("page"); //_root.gotoAndStop(p); }; var c = 0; function checkPage() { var a:Array=stateVars_array; var i:Number; // check if the state vars updated and if so call the goState function defining how to handle updates for(i=0;i