需求是鼠标移动到相应的DATAGRID的条目时出现该产品的图片,并且图片跟着鼠标的移动而移动

 

   
   
   
   
  1. var titleWindow:TitleWindow; 
  2.             var img:Image; 
  3.             protected function dataGrid_itemRollOverHandler(event:ListEvent):void 
  4.             { 
  5.                  
  6. //              var posmodelVO:PosModelVO=dataProvider.getItemAt(event.rowIndex) as PosModelVO; 
  7.                 var posmodelVO:PosModelVO=event.itemRenderer.data as PosModelVO 
  8.                 if(titleWindow==null){ 
  9.                     titleWindow=new TitleWindow(); 
  10.                     img=new Image 
  11.                     img.width=100
  12.                     img.height=133
  13.                     img.maintainAspectRatio=false
  14.                     titleWindow.addElement(img); 
  15.                     titleWindow.width=110
  16.                     titleWindow.height=145
  17.                     titleWindow.setStyle("headerHeight","0"); 
  18.                     titleWindow.setStyle('borderSides','solid'); 
  19.                     titleWindow.setStyle('borderThickness','3'); 
  20.                     PopUpManager.addPopUp(titleWindow,this,false); 
  21.                 } 
  22.                     if(posmodelVO.p_w_picpath!=null){ 
  23.                         titleWindow.visible=true
  24.                         img.source=posmodelVO.p_w_picpath; 
  25.                         titleWindow.x=mouseX
  26.                         titleWindow.y=mouseY
  27.                     }else { 
  28.                         titleWindow.visible=false
  29.                     } 
  30.             }