Flex中如何通过icon样式从SWF中指定一个Button的例子
接下来的例子演示了Flex中如何通过icon样式从SWF中指定一个Button。
让我们先来看一下Demo(可以右键View Source或点击这里察看源代码):
下面是完整代码(或点击这里察看):
Download: main.mxml<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="horizontal"
verticalAlign="middle"
backgroundColor="white">
<mx:Button label="Bullet Add"
icon="@Embed(source='icons.swf', symbol='bullet_add')" />
<mx:Button label="Bullet Delete"
icon="@Embed(source='icons.swf', symbol='bullet_delete')" />
<mx:Button label="Bullet Star"
icon="@Embed(source='icons.swf', symbol='bullet_star')" />
</mx:Application>
本文转自:http://blog.minidx.com/2009/04/25/2389.html
相关文档:
前一阵在论坛上看到一个兄弟,想在Flex Chart中为图例设置3D效果,近几天查找了些资料,动手做了个DEMO供大家参考!
DEMO演示地址http://xingjunli.webs.com/flash/flexChartDemo.swf,先来个图片看看最终效果:
相关知识点
......
一、Application常用的事件
initialize=============>初始化
createcomplate==========>元素加载完
initialize发生在createcomplate之前。
二、数据请求说明
HTTPService==========>http数据请求。
SOAP(Simple Object Access Protocal)=======> webService
AMF(Adobe Action Message Format)========&g ......
strategyMarketsOfCurrentStrategy.addEventListener(CollectionEvent.COLLECTION_CHANGE, strategyMarketsDataChangedHandler);
strategyMarketsOfCurrentStrategy.removeAll(); &nbs ......
上面是一个flex做的选择,主要学习数据 Model跟DateGrid的用法 哈,源码如下:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="12">
<mx:Model id="books">
<datas>
<book>
  ......
Summary:
在DataGrid中显示层级结构,google了一下,找到flexlib中的TreeGrid。把源码加载到项目中,按照文档去实现其功能。最后发现有好多bug,比如定位不准,无法拖动等问题。通过阅读和修改TreeGrid类,这些bug都解决了。接着无意中发现,排序有问题。点击列头排序,发现层级结构变混乱了,这个问题比较严重。因为creat ......