- 浏览: 581392 次
- 性别:
- 来自: 广州
-
文章分类
最新评论
-
wzh051527:
我是大四实习生一个,自我感觉技术能力在第三年。。唯一不明白,为 ...
十年技术,不要再迷茫 -
room_bb:
.hrl文件怎么加入到编译规则里面?比如:pp.hrl文件-d ...
Erlang中用的makefile的一点解释 -
吉米家:
感觉帆软报表的flash打印就很不错哇,特别好用
JSP 实现报表打印 -
雪碧爱芬达:
苦逼程序员的辛酸反省与总结 -
mlyjxx:
...
十年技术,不要再迷茫
Have you ever used [Bindable] in Flex? Do you know it is metatag? Apart from this, there are 12 more documented metatag in Flex framework. I will list them all out here for your reference:
ArrayElementType[Bindable]
[Bindable(event="eventname")]
Data type restriction like Java Generic
[ArrayElementType("String")]
public var arrayOfStrings:Array;
Bindable
Allows for easy data synchronization within the components. Bindable can be used to bind simple data, classes, complex data, functions and event. I will talk about this metatag in more detail later.
DefaultProperty
The DefaultProperty metadata tag is used to set a single property as a default property of a class. The 3 label controls are equivalent with “text” defined as default property in the component, so you don’t need to put <text> tag around it.
Embed
The Embed metadata tag is used to import images into your application. There are two ways to use Embed. You can either embed the image in ActionScript and assign it to a variable. Button 1 and 2 below do the same.
<mx:label text=”Hello”></mx:label> <mx:label> <mx:text>Hello</mx:text> </mx:label> <mx:label>Hello</mx:label>
[Embed(source="myIcon.gif")]
[Bindable]
public var myIcon:Class;
<mx:Button label=”Icon Button 1″ icon=”{myIcon}”/>
<mx:Button label=”Icon Button 2″ icon=”@Embed(source=’myIcon.gif’)”/>
Event
The Event metadata tag is used to declare events that will be dispatched by your custom class. Adding this metadata tag to your class definition allows you to add an event handler function to the MXML tag used to instantiate your custom class. You insert the [Event] metadata tag before the class definition in an ActionScript file, or in the <mx:Metadata> block in an MXML file.
In Actionscript:
[Event(name="myClickEvent", type="flash.events.Event")]
In MXML:
<?xml version=”1.0″?>
<mx:TextArea xmlns:mx=”http://www.adobe.com/2006/mxml”>
<mx:Metadata>
[Event(name="myEnableEvent", type="flash.events.Event")]
</mx:Metadata>
….
</mx:TextArea>
Effect
The Effect metadata tag is used to define a custom effect that will be dispatched when an event occurs. An effect is paired with a trigger that invokes the effect. A trigger is an event, such as a mouse click on a component, a component getting focus, or a component becoming visible. An effect is a visible or audible change to the component that occurs over a period of time. You insert the [Effect] metadata tag before the class definition in an ActionScript file, or in the <mx:Metadata> block in an MXML file. Same as Event syntax above.
[Effect(name="darkenEffect", event="darken")]
IconFile
IconFile is used to identify the filename of a jpg, gif, or png file that will be used as the icon for your custom class. While the [Embed] meta tag can be used to embed images files, SWF files, music files, video files, etc, IconFile is only used to embed a file that will be used as the icon for the custom class.
[IconFile("icon.png")]
public class CustomButton extends Button
{}
Inspectable
The Inspectable metadata tag is used to define the attributes of your custom component that you would like to display in the code hints and property inspector of Flex Builder 2.
InstanceType
The [InstanceType] metadata tag specifies the allowed data type of a property. Example below shows that you can only assign instance data type “mx.controls.Label” to variable topRow of type IDeferredInstance.
[InstanceType("mx.controls.Label")]
public var topRow:IDeferredInstance;
NonCommittingChangeEvent
TBA
RemoteClass
TBA
Style
The Style metadata tag is used to define custom style properties for your components. Simply add the Style metadata tag or tags to your class definition and then use the getStyle method to retrieve its value. I will talk about this metatag in more detail later.
发表评论
-
as3 Loader 加载资源后内存泄露无法释放的问题。
2014-06-21 10:30 653as3 Loader 加载资源后内存泄露无法释放的问题。 ... -
as3判断flash player版本的函数
2014-06-10 20:35 809//判断当前版本是否高于9.0.115.0为例子. pr ... -
CSS 中文字体的英文名称 (simhei, simsun) 宋体 微软雅黑
2014-04-03 15:25 986华文细黑:STHeiti Light [STXihei]华文 ... -
as3.0的垃圾回收机制
2013-09-07 14:02 1474还是同样的博客,还是同样的作者(Daniel Sidhio ... -
starling性能优化总结
2013-07-22 14:06 1455在项目开发的过程中总结了一下starling的性能优化方案: ... -
AS3 Socket从零开始
2013-07-22 12:54 1082大家如果想学AS3 Socket直接在百度里搜一下,会找到很 ... -
绕开AS3安全沙箱 跨域加载SWF
2013-07-11 12:53 880AS3的安全沙箱的确是 ... -
解决AS3在ie中初始化时stageWidth和stageHeight为0
2013-06-14 09:23 983先看下面的一段脚本,这是比较经典的初始化脚本: pac ... -
动态获取swc中的类
2013-05-25 10:32 926想通过代码生成,来获取swc中的类,并且可以作为普通类正常使 ... -
AS3 中字符串的format功能实现
2013-05-25 10:19 821使用C#的朋友都知道,string.Format();还是挺 ... -
总结调用Flash的几种方法
2013-05-02 16:18 1640一、Adobe 提供的方法 <object wi ... -
Flash3D错误集锦
2013-05-02 14:03 907VerifyError: Error #1014: 无法找到 ... -
使用scale拉伸之后的坐标问题
2013-04-12 09:38 1262最近发现论坛多了很多 ... -
30个实用的网页设计工具
2013-03-20 09:58 794作为一位网页设计师或开发者,你一直需要搜寻获取强大的网页设计 ... -
如何成为强大的程序员?
2013-03-11 11:27 707Aaron Stannard是新创公 ... -
漫谈重构
2013-03-11 11:09 830因为工作内容的原因, ... -
AS3使用谷歌API生成二维码
2012-12-10 16:24 1330二维码在新闻杂志,网站,网络广告,电视广告等地方随处可见 ... -
OOP的聚合原则
2012-12-10 16:21 912什么是聚合? 聚合可以很好地表达对象是什么和做 ... -
压缩速率追踪
2012-11-02 14:16 1435Flash Player 11.3添加了一个压缩和解压B ... -
SWF文件格式说明书--SWF文件头
2012-10-11 16:51 1210SWF文件头 字段 类型 ...
相关推荐
Flex 3D云标签 源代码
Flex 3D标签云 Flex实现3d FlexCumulusTagCloud Flex学习3d教程 flex builder 如何做出3D标签云
flex标签flex标签flex标签flex标签flex标签flex标签flex标签
欢迎大家下载,多提宝贵意见!!!(*^__^*)
Flex 标签云 特效 漂亮 Flex 标签云 特效 漂亮
flex as3 元数据标签综合 flex as3 元数据标签综合 flex as3 元数据标签综合
NULL 博文链接:https://qiqishou.iteye.com/blog/602268
flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图...
Flex 中的元数据标签的用法和详细介绍
FLEX特效FLEX特效FLEX特效FLEX特效 FLEX特效FLEX特效FLEX特效FLEX特效 FLEX特效FLEX特效FLEX特效FLEX特效 FLEX特效FLEX特效FLEX特效FLEX特效
Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex ...
Flex中利用HTTPService MXML标签(tag)将XML转化为对象(objects)
Flex简介Flex简介Flex简介Flex简介Flex简介
flex事件flex事件flex事件flex事件flex事件
flex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex学习的好资源啊
Flex 组件Flex 组件Flex 组件Flex 组件Flex 组件
特征: 分离器标签标签拖动和排序拖动选项卡集(一次操作即可移动选项卡集中的所有选项卡) 停靠到标签集或框架边缘最大化标签集(双击标签集标题或使用图标) 选项卡溢出(选项卡溢出时显示菜单,使用鼠标滚轮滚动...
java flexjava flexjava flex
Flex万年历记事本_flex源码