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

flex 图表使用百分比示例

<?xml version="1.0"?>
<!-- charts/PredefinedAxisStyles.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Script>
<!--[CDATA[
//导入相关包
import mx.collections.ArrayCollection;
import mx.charts.*;
import mx.charts.series.items.ColumnSeriesItem;
import mx.charts.ChartItem;
import mx.charts.chartClasses.Series;
import mx.charts.chartClasses.IAxis;
import mx.utils.ObjectUtil;

[Bindable]
public var expenses:ArrayCollection = new ArrayCollection([
{Month:"*", Profit:20, Expenses:15},
{Month:"**", Profit:10, Expenses:20},
{Month:"***", Profit:30, Expenses:40},
{Month:"****", Profit:15, Expenses:25},
{Month:"*****", Profit:40, Expenses:45}
]);



public function myLabelFormat(obj:Object,pcat:Object,ax:LinearAxis):String
{
return numForm.format(obj)+"%";
}

private function setCustomLabel(element:ChartItem, series:Series):String {
// Get a refereence to the current data element.
var data:ColumnSeriesItem = ColumnSeriesItem(element);

// Get a reference to the current series.
var currentSeries:ColumnSeries = ColumnSeries(series);

// Create a return String and format the number.
return numForm.format(data.yNumber) + "%";
}


// This method customizes the values of the axis labels.
// This signature (with 4 arguments) is for a CategoryAxis.
public function defineLabel(
cat:Object,
pcat:Object,
ax:CategoryAxis,
labelItem:Object):String
{
// Show contents of the labelItem:
for (var s:String in labelItem) {
trace(s + ":" + labelItem[s]);
}

// Return the customized categoryField value:
//return cat + "";

return '<font size="35"><font color="#ff0000">' + cat + '</font></font>';
//'<font color="#ff0000">'


相关文档:

Flex中应用程序、模块之间参数传递

·   Flex中应用程序、模块之间参数传递一般有三种方式:
·   1.通过URL携带参数进行传递
·   2.通过事件进行传递
·   3.实现接口进行传递
·   其中URL传递参数时:
·   Application之间和Module之间是有区别的 ......

flex加载外部swf文件,并且互相通讯

从网上转载的,还没时间鉴定,暂记录在这里
http://blog.csdn.net/zyjasp/archive/2008/05/16/2452175.aspx
第一步:建立加载类[CtmObjLoader],此类可以加载文件类型 [图片文件或swf文件]
package
{
import flash.display.DisplayObject;
import flash.display.Loader;
import flash.events.*;
import flash. ......

Flex BlazeDS Message Service

 消息服务(Message Service )提供发布(publish)/订阅(subscribe)机制允许Flex 应用程序发布消息、订阅消息终端(messaging destination),从而实现实时数据的推和协作。
  一、Message Service
  Message Service 提供发布(publish)/订阅(subscribe)机制允许Flex 应用程序发布消息、订阅消息终端(messaging des ......

flex 滚动条问题

flex滚动条虽然很好用,但总是会出现意想不到的问题。前几天说了,拖动后花屏的问题,今天又发现了更恶心的问题。当你把容器的宽度调为100%后 ,verticalScrollbarPolicy 用默认的auto。这是如果你缩放窗口会出现滚动条,但问题这是就出现了,只要出现了垂直滚动条,水平滚动条就是被迫出现。
<?xml version="1.0" enco ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号