实现Flex中div浮动层效果的操作
2014-03-18 11:16
274 查看
实现FLEX的"DIV浮动层效果"
需求是鼠标移动到相应的DATAGRID的条目时出现该产品的图片,并且图片跟着鼠标的移动而移动
var titleWindow:TitleWindow;
var img:Image;
protected function dataGrid_itemRollOverHandler(event:ListEvent):void
{
// var posmodelVO:PosModelVO=dataProvider.getItemAt(event.rowIndex) as PosModelVO;
var posmodelVO:PosModelVO=event.itemRenderer.data as PosModelVO
if(titleWindow==null){
titleWindow=new TitleWindow();
img=new Image
img.width=100;
img.height=133;
img.maintainAspectRatio=false;
titleWindow.addElement(img);
titleWindow.width=110;
titleWindow.height=145;
titleWindow.setStyle("headerHeight","0");
titleWindow.setStyle('borderSides','solid');
titleWindow.setStyle('borderThickness','3');
PopUpManager.addPopUp(titleWindow,this,false);
}
if(posmodelVO.image!=null){
titleWindow.visible=true;
img.source=posmodelVO.image;
titleWindow.x=mouseX;
titleWindow.y=mouseY;
}else {
titleWindow.visible=false;
}
}
需求是鼠标移动到相应的DATAGRID的条目时出现该产品的图片,并且图片跟着鼠标的移动而移动
var titleWindow:TitleWindow;
var img:Image;
protected function dataGrid_itemRollOverHandler(event:ListEvent):void
{
// var posmodelVO:PosModelVO=dataProvider.getItemAt(event.rowIndex) as PosModelVO;
var posmodelVO:PosModelVO=event.itemRenderer.data as PosModelVO
if(titleWindow==null){
titleWindow=new TitleWindow();
img=new Image
img.width=100;
img.height=133;
img.maintainAspectRatio=false;
titleWindow.addElement(img);
titleWindow.width=110;
titleWindow.height=145;
titleWindow.setStyle("headerHeight","0");
titleWindow.setStyle('borderSides','solid');
titleWindow.setStyle('borderThickness','3');
PopUpManager.addPopUp(titleWindow,this,false);
}
if(posmodelVO.image!=null){
titleWindow.visible=true;
img.source=posmodelVO.image;
titleWindow.x=mouseX;
titleWindow.y=mouseY;
}else {
titleWindow.visible=false;
}
}
相关文章推荐
- 实现FLEX的"DIV浮动层效果"
- 实现Flex的div浮动层效果
- Flex实现的div浮动层效果的方法
- html固定浮动在底部div的实现效果
- jQuery实现的浮动层div浏览器居中显示效果
- jQuery实现的浮动层div浏览器居中显示效果
- jQuery实现div浮动层跟随页面滚动效果
- Jquery实现如何实现DIV由下向上展开的效果,鼠标浮动时div由下向上缓慢展开。
- jQuery实现div浮动层跟随页面滚动效果
- javascript实现div浮动在网页最顶上并带关闭按钮效果实例
- javascript实现div浮动在网页最顶上并带关闭按钮效果实例
- 用div实现的拖拽效果(适合作首页)2
- Flex与.NET互操作(八):使用FluorineFx网关实现远程访问
- DIV实现左边表头固定、右边内容滚动的效果代码
- 原生js实现div随鼠标移动效果
- Jquery实现遮罩层,就是弹出DIV周围都灰色不能操作
- JavaScript 浮动定位提示效果实现代码第1/2页
- jQuery实现div拖拽效果实例分析
- div实现拖拽效果,宽度发生变化
- Android ObjectAnimator 无限循环播放,实现上下左右浮动效果