In desperate need of help with SWFAddress!

Hi all,

Im going out of my mind trying to figure out why this wont work!!

Here’s the link [COLOR=#810081]http://steffensonderby.dk/messe/messe.html[/COLOR]

It loads fine. You can click on the boxes. (For the time being, only box nr 2 and 3 works). Since it in danish, i’ll explaine shortly: Click on box nr 2 - An information site views, click on a color and the “x” in top right corner. Then you’re back to the main page. Nothing fancy here. You can even use the back button in the browser, but only as long as you havent clicked more than one box.
E.g. say you click on box 2, mark it, then click on box 3, mark it and then returns to main site. If you then click on the back button, it will take you back as far as the first time you entered a box’ info. It then freezes when trying to execute the function handler.

Im really desperate here! Im on day two without any luck!!! Or any help from anywhere. Please if you have any suggestions to how I can address this problem, dont hesitate to reply.

My project is rather big, so i’ll just post the SWFAddress handlers here and explain whats going on.


 
 
//SWFAddress CHANGE handler
private function onChange(e:SWFAddressEvent):void 
{
 //If value is not default "/", then create a string containing a box ID e.g. "/101" and substract the "/"
 if (e.value != "/")
 {
  var swfVirkId:String = e.value.substring(1);
  //loops through an array containing all the boxes. Every box instance has an ID(virkId), and so the
  //loop tjecks to see if theres a match. If so, then dispatch the mouseClick handler (dispatchClick) for that box.
  for (var i:int = 0; i < _standeArray.length; i ++)
   {
   if (swfVirkId == _standeArray*.virkId) 
    {
    _standeArray*.dispatchClick();
    } 
   }
   //Sets the title bar to that ID
   SWFAddress.setTitle("Messe virksomhed nr: " + e.value.substring(1));
 }
 else if (e.value == "/")
 {
  //_idValue gets passed from the close function within the box that is open.
  //If null then its the default, or, first time its been loaded, there for no need to loop.
  //Think it might be here that im missing something!!
  if (_idValue != null) 
  {
   //Again loops through the array, find the matching ID and dispates the close function (sort)
   for (var i:int = 0; i < _standeArray.length; i ++)
    {
     if (_idValue == _standeArray*.virkId) 
     {
     _standeArray*._standWall.sort();
     } 
    }
 
  }else 
  {
   trace("Start page");
  }
  SWFAddress.setTitle("Messe virksomheder");
 } else 
  {
  trace("somethings gone horrible wrong");
  SWFAddress.setTitle("Messe WTF");
  }
 
}
//This get called after the loading of all the elements on stage
  //trace(_css.styleNames);
_xl = new XMLLoader();
_xl.skipErrors = true;
_xl.cacheBuster = false;
_xl.addEventListener(Event.COMPLETE, completeListener, false, 0);
_xl.loadXML(["kort/map-virtual.xml", "virksomhedsdata.xml.aspx"],["kortXML", "virksomhedXML"]);
}
private function addSwfAddress():void
{
 SWFAddress.addEventListener(SWFAddressEvent.CHANGE, onChange);       
}
//When the user clicks on any of the options inside the information page regarding returning to main page,
//this gets executed
public function swfAddressHomeNone(idValue:String):void
{
 _idValue = idValue;
 SWFAddress.setValue("/");
}
//the mouseclick handler for all the boxes instances on stage
private function swfAddressClick(e:MouseEvent):void 
{
 //Here is where the _idValue from above gets set
 _idValue = e.currentTarget.virkId;
 SWFAddress.setValue(String(e.currentTarget.virkId));
}   
 

Again any reply is highly appreciated!!