stop(); // returns an array, eg: /eat/menu/fried/ returns ('eat','menu','fried') // note: there must be a beginning and trailing slash (/) function extractPaths(str) { str = str.substr(1,str.length - 2); return str.split('/'); } // SWFAddress calls this function when the address changes // (2 Ways: The Browser's address bar , or SWFAddress.setValue()) function handleChange(event:SWFAddressEvent) { var path = extractPaths(event.path); loader_mc.loadMovie("home.swf", "home", path); // Set the title bar text var flink = (path[0] eq '') ? '' : ': ' + path.join(" / ") + ''; SWFAddress.setTitle('AFW' + flink); } SWFAddress.addEventListener(SWFAddressEvent.CHANGE, handleChange);