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

Flex 计算String的宽度

应为设计要求, 我需要计算String的宽度,
搜索了下网上的文章, 看到有用measureText(string)的,
可是用了下发现, 这个function得到的string大小, 不会根据字体的大小, 粗黑的变化,
始终返回同一个值, 也许是我的用法不对, 最后我没有这个方法,
改用了另外一个方法:
private function getTextWidth():int
{
     var lb:Label = new Label();
     lb.regenerateStyleCache( false );
     var textMetrics:TextLineMetrics = lb.measureText( label );
     var textWidth:int = textMetrics.width;
     return textWidth;
}
如果不行, 确定 maxDisplayedLines="1"


相关文档:

Flex Builder 3.0 For Eclipse 3.3 安装方法[转]

Flex Builder 3.0 For Eclipse 3.3 安装方法
Flex Builder 3.0 For Eclipse 3.3 安装方法
  这两天准备学习Flex,于是下载了Flex Builder 3.0 For Eclipse plugin准备安装.
但是安装后启动Eclipse,找了半天也没找到Flex.而且Flex Builder会把JRE也安装.觉得这样很不爽.
所以我想到能不能来个Flex Builder绿色安装方 ......

flex 拖拽,指定拖拽代理,由一个容器拖放到另一个里

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Script>
<![CDATA[
import mx.core.BitmapAsset;
import mx.core.DragSource;
import mx.events.DragEvent;
import mx.managers.DragManager;
private var xoffset:Number;
private var yoffset:Number;
priv ......

Flex的HSV to RGB ,RGB to HSV 算法

/*Copyright (c) 2006 Adobe Systems Incorporated
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, m ......

flex初学(一)

Flex中控件组件一大堆,总结一下。
1. 
用来布局的控件有  form、canvas、panel、box 等。 当然box 中又有很多了,有vbx、hbox、VDividedBox、HividedBox、Tile。 当然这些里面大体上又分为两种
一种是绝对布局、一种是相对布局(个人认为啊)。其中canvas 是只支持绝对布局的 form、box 只支持相对布局。而p ......

Flex 与 servlet 通信 【xml】

String userId = request.getParameter("userId");
System.out.println(userId);
response.setCharacterEncoding("UTF-8");
//response.getWriter().println("hello world -- 我爱你。。。");
String xml = "<user>" +
"<username>涛哥</username>" +
"</user>";
respon ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号