Flex the world

Flex, AIR and Things......

控件名称 (Component Name):iMagnifyingGlass.as
作用 (Description):控件继承于Panel, 和普通panel使用方法相同,对放入其中的所有Image,当鼠标划过时有放大镜效果。 (iMagnifyingGlass extends from panel that can enlarge all passed in images when mouseover)

接口 (apis)

属性(Attributes):

multiple:Number -- 设置放大倍数,默认2倍 (Default value is 2)
glassHeight:Number -- 设置镜片高度,默认150px (Magnifying glass height, default value is 150px)
glassWidth:Number -- 设置镜片宽度, 默认150px (default value is 150px)
glassStyleName: Number -- 设置镜片样式表 (set the style name of glass)

方法 (Function):

setGlassStyle(stylrProp:String,newValue:Object) -- 设置镜片样式 (set styles of glass)

Demo:

Demo:

<component:iMagnifyingGlass hideEffect="" title="放大镜Demo" multiple="4" layout="vertical" id="mG" >
<mx:HBox>
<mx:Image source="{pic1}" width="256" height="192" />
<mx:Image source="{pic2}" width="256" height="192" />
</mx:HBox>
<mx:HBox>
<mx:Image source="{pic3}" width="256" height="192" />
<mx:Image source="{pic4}" width="256" height="192" />
</mx:HBox>
</component:iMagnifyingGlass>





Demo和源文件下载

0 评论:

发表评论