实现Flex的div浮动层效果
2014-03-18 11:09
239 查看
实现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浮动层效果"
- jQuery实现div浮动层跟随页面滚动效果
- jQuery实现div浮动层跟随页面滚动效果
- javascript实现div浮动在网页最顶上并带关闭按钮效果实例
- javascript实现div浮动在网页最顶上并带关闭按钮效果实例
- Jquery实现如何实现DIV由下向上展开的效果,鼠标浮动时div由下向上缓慢展开。
- jQuery实现的浮动层div浏览器居中显示效果
- html固定浮动在底部div的实现效果
- jQuery实现的浮动层div浏览器居中显示效果
- 用DIV 来代替JAVASCRIPT以实现无间隔新闻滚动的效果
- flex中实现marquee效果(由下而上滚动)
- 实现淘宝商品页面的滑块浮动切换页面的效果修改版
- js实现一个可以兼容PC端和移动端的div拖动效果
- 实现鼠标进入进出div时位置的监听效果
- 用DIV+javascript实现首尾相连循环滚动效果(兼容firefox)
- Flex如何实现快捷键效果
- jQuery 实现侧边浮动导航菜单效果
- 体验css+div 之 实现简单浮动层的基本方法