title: Need coding for Mouse hover reads entire row of Flash dataGrid
body: <p>Action Script 3 Flash CS5
  We have a datagrid fed settlement names from a csv file from an excel spreadsheet. User hovers over a row and the settlement MovieClips show up for those in that row. What should the coding be in this code below to achieve that please ? </p>
  
  <p>I have in the past managed eventListeners on buttons, one button calls up one MovieClip but this has me stumped. I am out of my comfort zone in coding so need to see the code please sitting in our code. I came across this site which looks to be the answer to our prayers as you do post coding as answers.</p>
  
  <p>The other challenge is that the datagrid shows names as they really are e.g. Devil's Bridge but MC instance names and coding doesnt like gaps and apostrophes, the coding below now does this with the addition of string to the row.</p>
  
  <p>Ideally we need it to alter the names so they match the MC instance names behind the scenes with the user seeing gaps and apostrophes, but not sure how thats done.</p>
  
  <p>Our test datagrid with fictitious names is currently 3 columns but the real mcoy will have more. This is for bus routes and if the excel sheet sees another column added due to an extra long service, then is saved as csv I wonder if the code will see this or need altering ?</p>
  
  <pre><code>import flash.net.URLLoader;  
  import flash.events.Event;  
  import flash.net.URLRequest;  
  import fl.data.DataProvider;  
  import fl.controls.DataGrid;  
  
  var urlLoader:URLLoader = new URLLoader();  
  urlLoader.addEventListener(Event.COMPLETE,completeF);  
  urlLoader.load(new URLRequest("TestNames.csv"));  
  var MyDataGrid:DataGrid  
  
  function completeF(e:Event):void{  
      var dataS:String = e.target.data;  
      var dataA:Array = dataS.split("\n").join("").split("\r");  
      var dpA:Array = [];  
      var itemA:Array;  
      var r:RegExp = /\W/g;  
      for(var i:int=0;i&lt;dataA.length;i++){  
          itemA = dataA[i].split(",");  
          dpA.push({"column1": String(itemA[0]).replace(r, ""), "column2": String(itemA[1]).replace(r, ""), "column3": String(itemA[2]).replace(r, "")});  
      }  
      var dp:DataProvider = new DataProvider(dpA);  
      MyDataGrid.columns = ["column1","column2","column3"]  
      MyDataGrid.dataProvider = dp;  
  }  
  </code></pre>
  
  <p>Hope you can help please.</p>
  
  <p>Envirographics</p>