用自己的脑袋去做事情

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Flex 2.0 裡面有許多的 Metadata
有些是給 AS 編譯器看的
有些是給 MXML 編譯器看的
使用者也可以自行定義 Metadata

官方文件內只有說明一部分的 Metadata Tag
還有很多不知道其功能為何

以下是粗略的整理,包含 Metadata Tag 名稱與幾個簡單的例子

文件上有記載的

http://livedocs.macromedia.com/flex/2/docs/00001651.html

	[ArrayElementType]
[ArrayElementType("mx.states.Transition")]
[ArrayElementType("mx.states.State")]

[Bindable]
[Bindable("errorStringChanged")]
[Bindable("toolTipChanged")]
[Bindable("currentStateChange")]
[Bindable("verticalScrollPolicyChanged")]

[DefaultProperty]
[DefaultProperty("dataProvider")]
[DefaultProperty("children")]

[Effect]
[Effect(name="hideDataEffect", event="hideData")]
[Effect(name="moveEffect", event="move")]

[Embed]
[Embed(source="Beep.mp3")]

[Event]
[Event(name="itemClick", type="mx.charts.events.LegendMouseEvent")]
[Event(name="hide", type="mx.events.FlexEvent")]

[IconFile]
[IconFile("Repeater.png")]
[IconFile("AreaChart.png")]

[Inspectable]
[Inspectable(defaultValue="true")]
[Inspectable(environment="none")]
[Inspectable(category="Data")]
[Inspectable(category="General", enumeration="overlaid,stacked,100%", defaultValue="overlaid")]


[InstanceType]
[InstanceType("mx.controls.Label")]
public var topRow:IDeferredInstance;

[NonCommittingChangeEvent]
[NonCommittingChangeEvent("change")]

[Style]
[Style(name="axisStroke", type="mx.graphics.IStroke", inherit="no")]
[Style(name="fontWeight", type="String", enumeration="normal,bold", inherit="yes")]
[Style(name="barWidthRatio", type="Number", inherit="no")]


文件上沒記載的
	[SWF]
[SWF(width="300", height="200", frameRate="18", backgroundColor="#FFFFFF")]

[RemoteClass]
[RemoteClass(alias="flex.messaging.io.ArrayCollection")]
[RemoteClass(alias="flex.messaging.io.ArrayList")]

[Frame]
[Frame(factoryClass="mx.managers.SystemManager")]
[Frame(factoryClass="mx.core.FlexApplicationBootstrap")]


[Frame(extraClass="Obj")] [ExcludeClass] [DefaultBindingProperty] [DefaultBindingProperty(destination="dataProvider")] [DefaultTriggerEvent] [DefaultTriggerEvent("itemClick")] [DefaultTriggerEvent("scroll")] [Exclude] [Exclude(name="defaultButton", kind="property")] [Exclude(name="horizontalScrollPolicy", kind="property")] [Exclude(name="icon", kind="property")] [Exclude(name="label", kind="property")] [Exclude(name="tileHeight", kind="property")] [ResourceBundle] [ResourceBundle("validators")] [ResourceBundle("SharedResources")] [ResourceBundle("foo")] [PercentProxy] [PercentProxy("percentHeight")] [RequiresDataBinding] [RequiresDataBinding(true)] [CollapseWhiteSpace] [MaxChildren] [MaxChildren(0)] [AccessibilityClass] [AccessibilityClass(implementation="mx.accessibility.PanelAccImpl")] [AccessibilityClass(implementation="mx.accessibility.TitleWindowAccImpl")] [Transient]
posted on 2008-03-04 11:45  netlynx2000  阅读(605)  评论(0编辑  收藏  举报