易截截图软件、单文件、免安装、纯绿色、仅160KB

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();
}
]]>


相关问答:

flex 连接数据库失败??

我是按  http://hi.baidu.com/dapao98301/blog/item/eff43ed557b44509a08bb75f.html 给我的提示做的,现在总是

<mx:RemoteObject id="getData" destination="dataService1" res ......

asp.net/j2ee/flex/silverlight 探讨

各位大虾,讨论下时下流行的技术。
应用范围是网络管理系统,或企业内部门户网站。
可能的架构组合是asp.net MVC+flex
asp.net MVC+Silverlight
J2EE MVC+flex
J2EE MVC+Silverlight
各种架构具体 ......

flex里有什么办法能让mx:image在缩放后自动居中

有没有什么办法让image在载入后缩放到适合大小,然后还能自动在容器内居中。

谢谢
        //计算图片框的大小
        public function caculate_size():void ......

Flex如何跟需要用户名和密码的web server交互?

登录web系统后后,可以看到网页中的swf,现在想通过swf往系统中插入一个订单,
请问会成功吗,swf会把网页的用户信息传递到服务器端吗?

还是说要专门做一个不需要用户名密码的页面,用来插入订单,这样是 ......

flex和java通信问题

<mx:RemoteObject  id="say" destination="Hello" >

</mx:RemoteObject>


用remoteObject 的 getOperation 方法得到调用的java方法。然后得到一个Abstr ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号