- 浏览: 261314 次
- 性别:
- 来自: 福州
文章分类
最新评论
-
sflscar:
太好了,我搞了一下午,批量插入,第一个参数个数没对sql批量导 ...
redis pipe大数据量导入 -
赵青青:
那 entity.hbm.xml 文件中的主健策略怎么配置 ...
Hibernate 和 Access -
GapStar:
换成flash IconCellRenderer.as应该怎么 ...
DataGrid 中加入图标 -
binbinyouli:
不好意思。我把楼主注释掉得部分打开了。但是我看楼主有传递对象的 ...
Flex Flash 和JAVA 在Socket交互 -
binbinyouli:
不知道前两位评论人时怎么做得。我再做这个例子的时候出现了安全沙 ...
Flex Flash 和JAVA 在Socket交互
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
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.
[Bindable]
[Bindable(event="eventname")]
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.
<mx:label text=”Hello”></mx:label>
<mx:label>
<mx:text>Hello</mx:text>
</mx:label>
<mx:label>Hello</mx:label>
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.
[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.
原文地址:http://www.solutionhacker.com/2007/06/03/flex-looking-into-metatag/ <noscript type="text/javascript"></noscript>
发表评论
-
Flex中使用JSon
2009-10-10 19:58 1090这是我从一位网友里看的例子,发现用Json真的很方便。附件中是 ... -
Flex 预载界面美化 Flex's preloader is not so flex
2009-03-03 16:24 3060转自: http://riashanghai.com/zh-h ... -
Flex 嵌入资源
2009-03-03 16:22 1289http://www.adobe.com/cn/devnet/ ... -
Flex中的嵌入资源(Embedding Assets)
2009-03-03 16:19 1318转自:http://hi.baidu.com/sw ... -
如何监听Canvas上滚动条的出现或隐藏 Quick Tip: How to Monitor the
2009-03-03 15:41 1851转自:http://riashanghai.com/zh-ha ... -
Flex中Event与Bindable
2009-03-03 15:37 4119转自:http://liguoliang.com Event: ... -
ResourceBundle用法
2009-03-03 11:18 2996ResourceBundle 用于解释资源文件。 1.新建 ... -
用Point+Graphics画虚线
2009-03-03 10:57 1515Graphics为我们提供了moveTo/lineTo,dra ... -
一个flex例子(自定义download progress bar的)
2009-03-03 10:52 2399预览:http://www.onflex.org/flexap ... -
同一个Column,不同ItemEditor
2009-03-03 10:19 1268这类需求比较少见,不过还是被我碰上了,哈哈。AdvancedD ... -
自定义Flex的Loading界面
2009-02-25 17:37 4615这个方法网上已经有人写过例子... 在这里我只是自己做个实例并 ... -
flex:嵌入应用程序资源
2008-12-29 14:56 1136可以在 Adobe® Flex™ 应用程序中嵌入各种类型的资源 ... -
Flex开发自定义控件(基础篇)
2008-12-29 14:53 1418前期准备: 点击File菜单 -> New -> ... -
Flex Cookbook --13.11深度拷贝ArrayCollection
2008-12-29 14:51 222713.11 深度拷贝一个ArrayCollection集合13 ... -
Flex 中的元数据标签
2008-12-29 14:45 1345Flex 元数据标签——告诉编译器如何编译 虽然多数F ... -
Flex Flash 和JAVA 在Socket交互
2008-12-29 14:40 7154首要要了解.两种语言是 ... -
AS3的网页参数处理
2008-12-29 14:36 1244我们一般向网页swf文件传入参数有两种方式,一种是URL如: ... -
Cookie类
2008-12-29 14:36 987[AS3]Cookie类 [AS2]Flash版本的Cooki ... -
Flex学习笔记_09 数据绑定_晋级篇
2008-12-29 14:34 9029.2.1 函数和类级别的绑定 [Bindable]标签打使用 ... -
通过as3.0将文件保存到本地
2008-12-29 14:32 1830在一般情况下,网页上的Flash是不能对客户端的文件进行操作的 ...
相关推荐
这可以通过解压缩`flex2_tag_library_for_jsp.zip`,并将`flex-bootstrap-jsp.jar`复制到`/WEB-INF/lib`目录,同时将`flex-webtier-jsp.jar`复制到`/WEB-INF/flex/jars`。之后,在`web.xml`文件中添加相应的`...
这包括解压并复制`flex2_tag_library_for_jsp.zip`中的`flex-bootstrap-jsp.jar`到`/WEB-INF/lib`,并将`flex-webtier-jsp.jar`复制到`/WEB-INF/flex/jars`。然后在`web.xml`中添加`<taglib>`元素来注册这个库。 4....
- FIX: When the curve contain more then one figure and they were all unconfined and curve have alternative brush then whole flex-object bounding rectangle was filed. - FIX: The MaskColor property ...
<meta charset="UTF-8"> <title>jq input标签生成 .tag-container { display: flex; flex-wrap: wrap; } .tag { margin: 5px; padding: 5px 10px; border: 1px solid #ccc; border-radius: 4px; } ...
- `viewport meta tag`: `<meta name="viewport" content="width=device-width, initial-scale=1">`,确保在移动设备上正确缩放。 4. **字体和文本样式** - `font-family`: 指定字体系列,通常使用多个字体,以防...
演讲中还提到了视口元标签(Viewport Meta Tag)的重要性。通过合理设置视口元标签,可以控制网页在不同设备上的显示效果,如设置`width=device-width`可以使页面宽度与设备宽度相同,`initial-scale=1`则确保页面的...
<meta charset="UTF-8"> <title>jQuery 自定义标签添加 <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> .tags-container { display: flex; flex-wrap: wrap; margin-top: 5px; } ...
Your browser does not support the video tag. 感动图集 图集1"/> 图集2"/> 图集3"/> 感动新闻 新闻标题 新闻内容... <!-- Main Content End --> <!-- Footer Start --> <p>...
6. viewport meta tag:在HTML头部添加`<meta name="viewport" content="width=device-width, initial-scale=1">`,可以让网页根据设备的视口宽度进行适配,确保在移动设备上的正确显示。 在这个"凯文·鲍威尔的...
<meta charset="UTF-8"> <title>jQuery 创建标签 <script src="https://code.jquery.com/jquery-3.x.min.js"></script> <script src="js/main.js"></script> <div id="tagContainer"></div> ``` 接...
6. **Viewport Meta Tag(视口元标签)**:在HTML头部添加 `<meta name="viewport" content="width=device-width, initial-scale=1">` 可以告诉浏览器如何调整页面的宽度以适应移动设备。 7. **Adaptive Techniques...
* CSS 布局:flex 伸缩布局、移动 Web 开发等 * CSS 选择器:tag 选择器、class 选择器、id 选择器等 JavaScript 基础 * 变量和数据类型:number、string、boolean、array、object 等 * 运算符和控制结构:if 语句...
9. 视口元标签(Meta viewport tag):在HTML头部添加`<meta name="viewport" content="width=device-width, initial-scale=1">`,可以帮助控制移动设备上的页面缩放和宽度。 10. 测试与调试:使用Chrome开发者工具...
- `viewport meta tag`:`<meta name="viewport" content="width=device-width, initial-scale=1">`,确保网页在移动设备上正确缩放。 5. 优化和性能: - CSS 预处理器(如Sass, Less):提供变量、嵌套规则等...
7. **SEO优化**:对于运营活动,搜索引擎优化(SEO)也很关键,这可能涉及到元标签(`<meta>`)的使用,如`<meta name="description">`来提供页面摘要,`<meta name="keywords">`指定关键词等。 8. **性能优化**:...
- **元信息**:`<meta>`标签用于设置字符编码、viewport等信息。 - **图像**:`描述">`插入图片。 - **链接**:`<link rel="stylesheet" href="style.css">`引入外部样式表。 - **表单**:`<form>`, `<input>`, ...
`<head>`包含元信息,如标题(`<title>`)、字符集(`<meta charset="UTF-8">`)等;`<body>`则包含实际的网页内容。 2. 模块化思维:在网页模块页面中,我们常会遇到的模块包括导航栏(`<nav>`)、头部图像(`...
2. **头部信息** (`<head>`): 包含`<meta>`标签,用于设置字符编码、视口等信息;`<title>`标签定义了浏览器标签页上的标题。 3. **主体内容** (`<body>`): 这是页面可见内容的容器,包含各种元素如`<header>`、`...