flex 利用hslider控件以容器中心放缩图片
请问大家 有一图片在一容器中(canvas或 vbox)我想以容器为中心利用hslider控件来放缩图片,,该如何实现呢?在线等答案!!!
XML code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
import flash.events.Event;
import mx.controls.sliderClasses.Slider;
private var actualWidth:Number = 0;
private var actualHeight:Number = 0;
private function center(flag:Boolean = false):void
{
if (flag)
{
actualWidth = image.contentWidth;
actualHeight = image.contentHeight;
}
image.move(Math.round((canvas.width - image.contentWidth) / 2),
Math.round((canvas.height - image.contentHeight) / 2));
}
private function sliderChangeHandler(event:Event):void
{
var value:Number = (event.target as Slider).value;
image.content.width = Math.round(actualWidth * value);
image.content.height = Math.round(actualHeight * value);
center();
}
]]>
相关问答:
是这样的,这个问题可能看起来像询问QTP的,但之前对FLEX开发语言了解的很少,最近有个项目,需要用到
QTP,然后很郁闷的发现,使用QTP SPY选取不到FLEX页面中的任何一个对象,只可以选取WINOBJECT这个对象,
......
我是按 http://hi.baidu.com/dapao98301/blog/item/eff43ed557b44509a08bb75f.html 给我的提示做的,现在总是
<mx:RemoteObject id="getData" destination="dataService1" res ......
怎样才能将object对象清空? 以下是我写的一段代码:
var result:ArrayCollection=new ArrayCollection();(全局.....)
var obj:Object=new Object();(全局.......)
obj.Fcity=_city;
obj.Ftelno=_telno ......
我用了个盗版的序列号,现在想改成正版的,发现没地方改,卸载重启后重装也不行,它还是能认出盗版的那个序列号
卸载FB后删除注册表以下键值:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio ......
flex 中 <mx:images>控件有没有调节图片亮度这个控件啊,,,,我想把图片亮度调低,如何实现呢,,在线等答案。。。
<mx:Image x="48" height="30" width="30 " ......