flex 常用元标签讲解
Flex
引入了元数据标签的概念,大多数人都使用过的
[Bindable]
标签便是其中的
meta tag
之一,它在代码中的作用就是向编译器提供如何编译程序的信息。实际上,这些标签并没有被编译到生成的
SWF
文件中,而只是告诉编译器如何生成
SWF
文件。
adobe
官网
http://livedocs.adobe.com/flex/3/html/help.html?content=metadata_3.html详细讲解了
16种
meta
的使用,简单如下表所示。
Tag
Description
[ArrayElementType]
Defines the allowed data type of each element of an Array.
[Bindable]
Identifies a property that you can use as the source of a data
binding expression.
[DefaultProperty]
Defines the name of the default property of the component when you
use the component in an MXML file.
[Deprecated]
Marks a class or class element as deprecated so that the compiler
can recognize it and issue a warning when the element is used in an
application.
[Effect]
Defines the MXML property name for the effect.
[Embed]
Imports JPEG, GIF, PNG, SVG, and SWF files at compile time. Also
imports image assets from SWC files.
[Event]
Defines the MXML property for an event and the data type of the
event object that a component emits.
[Exclude]
Omits the class element from the Flex Builder tag inspector. The
syntax is as follows:[Exclude(name="label",
kind="property")]
[ExcludeClass]
Omits the class from the Flex Builder tag inspector. This is
equivalent to the @private tag in ASDoc when applied to a class.
[IconFile]
Identifies the filename for the icon that represents the component
in the Insert bar of Adobe Flex Builder.
[Inspectable]
Defines an attribute exposed to component users in the attribute
hints and Tag inspector of Flex Builder. Also limits allowable values of the
property.
[InstanceType]
Specifies the allowed data type of a property of type
IDeferredInstance.
[NonCommittingChangeEvent]
Identifies an event as an interim trigger.
[RemoteClass]
Maps the ActionScript
相关文档:
flex三种连级方式:
内联:<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="var codetxt:Text=new Text">
</mx:Application>
级联:<mx:Application xmlns:mx="http: ......
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绿色安装方 ......
用Accordion组件的时候发现,child展开之后再点击的时候没有相应.
然后习惯性的Google发现解决方法大致是自定义一个组件...
感觉为了一个小功能重写有点 杀鸡用牛刀的感觉.
于是仔细想了下,发现其实只需要指定header的itemRenderer即可:
上代码 headerRenderer="com.MyAccHeader"
MyAccHeader:
package com
{
......
首先要求大家到数据库建立一个数据库,在我这例子中数据库名为userDb,建立一个表userInfo,里面设置两个字段一个为id,一个为name。
创建以下java代码在src目录下
User.java
package org.rjb.java;
public class User {
private String name;
public String getName() {
return name;
}
public voi ......
Flex中控件组件一大堆,总结一下。
1.
用来布局的控件有 form、canvas、panel、box 等。 当然box 中又有很多了,有vbx、hbox、VDividedBox、HividedBox、Tile。 当然这些里面大体上又分为两种
一种是绝对布局、一种是相对布局(个人认为啊)。其中canvas 是只支持绝对布局的 form、box 只支持相对布局。而p ......