自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(61)
  • 收藏
  • 关注

原创 Flex基础-----之DataProvider详解

      在我分享的一篇文章中,讲解了几种关于做DataProvider的途径,但是最近没事又仔细的了解了一下。发现这其中还有好多变化之处。下面就讲拿用数组作为数据提供器来详细解析一下:举个最简单的例子: xmlns:mx="http://www.adobe.com/2006/mxml" viewSourceURL="src/DataProviderArray/index.html" width="150" height="140"> [Bindable] 

2010-08-26 17:47:00 7374 1

原创 Working with item renderers

<br />Example: Using an item renderer with the TileList and HorizontalList controls<br />The TileList and HorizontalList controls display a tiled list of items. The TileList control displays items in vertical <br />columns. The HorizontalList control displ

2010-10-17 15:38:00 659

原创 Chapter 22: Using Item Renderers and Item Editors--Creating item renderers and item editor components

Defining a custom item renderer or item editor by using an MXML component gives you greater flexibility and functionality than using a drop-in item renderer or item editor. Many of the rules for defining item renderers and item editors as custom components

2010-10-17 15:24:00 654

原创 Chapter 22: Using Item Renderers and Item Editors--Creating inline item renderers and editors

<br />You define inline item renderers and item editors in the MXML definition of a component. Inline item renderers <br />and item editors give you complete control over item rendering and cell editing.<br />Creating a simple inline item renderer or item

2010-10-17 15:20:00 703

原创 Chapter 22: Using Item Renderers and Item Editors--Creating drop-in item renderers and item editors

<br />     Several Flex controls are designed to work as item renderers and item editors. This lets you specify these controls <br />as values of the itemRenderer or itemEditor property. When you specify one of these controls as a property <br />value, it

2010-10-17 15:07:00 650

原创 Chapter 22: Using Item Renderers and Item Editors--Creating an item renderer and item editor

One of the first decisions that you must make when using custom item renderers and item editors is how to implement them. Flex lets you define item renderers and item editors in three different ways:Drop-in item renderers and item editors Insert a single

2010-10-17 12:12:00 903

原创 Flex--flex组件初始化顺序

今天项目

2010-10-15 17:36:00 1344

翻译 Flex--Use Flex的命名空间 :mx_internal

What is mx_internal ?    Traditionally in OOO languages access specifiers are used to control visibility of declarations (public, private, protected). Now with XML based languages like MXML making debut, a new mechanism for controlling visibility of declar

2010-10-15 15:05:00 2298 2

原创 Flex-- TextArea with Row/Line Numbers (可以显示行数的TextArea)

<br /><?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" horizontalAlign="left" minWidth="600" minHeight="600" width="100%" height="100%" backgroundColor="#ffffff" paddingLeft="45" pad

2010-10-15 14:49:00 3843

转载 Flex--如何使Flex textarea组件滚动条自动滚到最底部

<br /><mx:Script> <!--[CDATA[ this.textarea.addEventListener(FlexEvent.VALUE_COMMIT,onValueCommit); private function onValueCommit(event:FlexEvent):void{ //下面这句代码就是关键了 this.textarea.verticalScrollPosition=this.textarea.maxVerticalScrollPo

2010-10-14 15:35:00 4545 2

翻译 Chapter 22: Using Item Renderers and Item Editors--About item renderers

You can customize the appearance and behavior of cells in list-based data provider controls that you use in Adobe? Flex? applications, including the DataGrid, HorizontalList, List, Menu, MenuBar, TileList, and Tree controls. To control the appearance of ce

2010-10-14 15:29:00 1267

原创 Chapter 11: Using Menu-Based Controls--PopUpMenuButton control

<br />The PopUpMenuButton is a PopUpButton control whose secondary button pops up a Menu control. When the <br />user selects an item from the pop-up menu, the main button of the PopUpButton changes to show the icon and <br />label of the selected menu ite

2010-10-14 14:02:00 707

原创 Chapter 11: Using Menu-Based Controls--MenuBar control

<br />A MenuBar control displays the top level of a menu as a horizontal bar of menu items, where each item on the bar <br />can pop up a submenu. The MenuBar control interprets the data provider in the same way as the Menu control, <br />and supports the

2010-10-14 13:59:00 564

翻译 Chapter 11: Using Menu-Based Controls--Menu control

<br />The Menu control is a pop-up control that contains a menu of individually selectable choices. You use Action-<br />Script to create a Menu control that pops up in response to a user action, typically as part of an event listener. <br />Because you cr

2010-10-14 13:55:00 653

翻译 Chapter 11: Using Menu-Based Controls--Menu-based control events

User interaction with a Menu or menu-based control is event-driven; that is, applications typically handle events generated when the user opens, closes, or selects within a menu, or submenu or rolls over or out of menu items. For detailed information on ev

2010-10-13 17:15:00 663

翻译 Chapter 11: Using Menu-Based Controls Defining menu structure and data

<br /> <br />所有的基于菜单控件的data providers 都有如下特点来指定菜单的结构和内容:<br /> •data providers经常是有层次的,但是你也可以只有一层菜单。<br /> • 每一个菜单项中都包括了来决定这个菜单项的外观和行为的field,基于菜单的控件支持这些field:定义label text,icon,菜单项的type,和菜单项的status。<br />About menu data providers<br /> 基于菜单控件的dataProvider属性具

2010-10-12 22:51:00 825

翻译 Flex--读写本地文件 in Flash Player 10

     Flash Player 10中的一个新的特点就是更新了ActionScript FileReference APIs,新的FileReference允许Flash能够直接读写用户系统的数据。     在Flash Player 10之前,为了能够读写用户的本地文件,Flash首先不得不先把它反弹回sever端,然后再从server端加载它,之后才可以访问它,这样不仅编程实现起来麻烦,而且还增加了应用的延迟和资源的使用。     The new functionality is achieved

2010-10-12 11:16:00 5636 2

翻译 Chapter 11: Using Menu-Based Controls--Defining menu structure and data

<br /> <br />所有的基于菜单控件的data providers 都有如下特点来指定菜单的结构和内容:<br /> •data providers经常是有层次的,但是你也可以只有一层菜单。<br /> • 每一个菜单项中都包括了来决定这个菜单项的外观和行为的field,基于菜单的控件支持这些field:定义label text,icon,菜单项的type,和菜单项的status。<br />About menu data providers<br /> 基于菜单控件的dataProvider属性具

2010-10-12 00:21:00 825

原创 Chapter 11: Using Menu-Based Controls--About menu-based controls

<br /><br />关于基于菜单的控件<br />Flex框架中包括三个控件能够以级联菜单的格式展示分层数据,所有的菜单控件中的每一个菜单项都有一个icon和label,并且都能派发出<br />mx.events.MenuEvent事件来响应用户,你可以使用如下基于菜单的控件。<br /> Menu控件   一个可视化的菜单,它可以有级联的子菜单项,通常你显示一个菜单是为了响应用户的行为,比如单击一个button,注意:你不能用MXML标签定义一个Menu控件,必须在Actionscript中定义、展

2010-10-12 00:18:00 599

原创 java-- properties总结

篇章一:Loading Properties from XMLXML 属性文档具有以下 DOCTYPE 声明: 注意,导入或导出属性时不 访问系统 URI (http://java.sun.com/dtd/properties.dtd);该系统 URI 仅作为一个惟一标识 DTD 的字符串: //注释 //值

2010-10-11 16:15:00 1444

翻译 Using event subclasses

<br />      Event对象属性范围非常大,这些属性是基于w3c标准的,但是Flex并没有全部实现它们。当你在监听函数中声明一个Event对象,你可以声明为Event类型,也可以声明为具体的类型,下面的例子声明的Event对象是MouseEvent类型的。<br />public function performAction(e:MouseEvent):void {<br />... <br />}<br /><br />大多数组件都是生成具体类型的Event类型的事件对象,例如,鼠标点击事件产生

2010-09-29 17:19:00 545

翻译 Event propagation事件传播

<br />当事件被触发时,Flex会有三个时期来检查事件监听器,这些阶段是按照下面的顺序发生的。<br />Capturing <br />Targeting <br />Bubbling<br />在每一个阶段,这些节点都有机会来对该事件做出反映,例如,假设用户点击了一个在VBox容器中的Button控件,在capturing阶段,Flex检查Application对象和VBox对象来处理该事件,然后进入targeting阶段,Flex会触发Button上的监听器,最后在bubbling阶段,VBox对

2010-09-29 17:12:00 1632

原创 Manually dispatching events手动触发事件

你可以使用组件的实例方法dispatchEvent() 来手动派发事件。所有的继承UIComponent的组件都有此方法,该方法继承自EventDispatcher类。 dispatchEvent() 语法如下:objectInstance.dispatchEvent(event:Event):Boolean

2010-09-28 15:44:00 994

原创 Chapter 4: About Event--Using events

在Flex中使用事件分为两步:第一步,在mxml中写个方法或者在类中写个类方法,这个方法也就是来响应事件的事件监听器或者事件处理者。该方法经常访问Event对象的一些属性或者应用状态的一些其他设置。该方法通常包括一个指定被传进来的某种事件类型的参数。

2010-09-28 15:32:00 596

原创 Chapter 4: About Event

<br />About events<br />关于事件<br />      事件(Event)让一个开发者了解Flex应用中发生了什么。用户的设备比如鼠标、键盘或是其他一些输入比如web service返回的结果都可以产生事件,在一个组件的显示或生命周期中当反生变化时,比如组件的创建和销毁或者大小的改变,都会触发事件。<br /><br />      和用户的任何交互都会产生event。当然如果没有和用户的直接交互事件也会发生,例如当如服务器端加载数据完成的时候或者附加的摄像机被激活时。在你的代码中通

2010-09-28 14:18:00 534

转载 Flex中的manager

<br /> Flex中的manager主要有以下几个:<br /><br /> 1、SystemManager(mx.managers.SystemManager):是Flex程序应用的主控者,每个Flex程序都是从SystemManager开始的;<br /><br /> 相信读者在启动Flex应用程序时,都会先看到一个进度条,这个就是下载应用程序的进度条,也是Flex程序的第一桢。<br /><br /> 加载完成后,就进入第二桢,也就是看到的应用程序,这时程序就可以运行了。<

2010-09-13 18:04:00 1725

转载 FLEX的开源项目,抽空好好看看,也许会有不少收获

Flex开源项目******************************************************************************************** 1. Flexboxhttp://flexbox.mrinalwadhwa.com/这是一位来自印度的flex开发者在07年2月份建立的flex组件库,里面也有不少好东西。

2010-09-13 13:35:00 844

转载 Flex中如何利用FocusManager类的setFocus函数设置TextInput的焦点的例子

<br />接下来的例子演示了Flex中如何利用FocusManager类的setFocus函数,设置TextInput的焦点。<br /><?xml version="1.0" encoding="utf-8"?><mx:Application name="FocusManager_setFocus_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalA

2010-09-10 19:04:00 3028

转载 Flex中改变对象在容器中的叠放层次

1、在容器中添加对象、移除对象和检测容器中是否存在对象容器对象.addChild(显示对象);//在容器中添加对象容器对象.removeChild(显示对象);//在容器中删除对象容器对象.contains(显示对象);//检测容器中是否存在显示对象,如果存在返回true,不存在返回false.

2010-09-10 16:50:00 819

原创 flash.net.SharedObject共享对象

通过使用SharedObject数据可以被存储在用户的本地硬盘上,功能非常像浏览器的cookie。Flex应用程序可以存储简单数据类型如String、Array等,或者用户自定义的对象类型到一个指定的位置。共享对象:本地共享对象(local SharedObject)和远端共享对象(Remote SharedObject) 本地共享对象(local SharedObject)类似于浏览器的cookie。 远端共享对象(Remote SharedObject):远端共享对象需要使用FMS(FMS是什么?),它

2010-09-08 15:54:00 3301

原创 Popup窗口访问父窗口的方法以及相互传值

此 IVisualElement 对象的所有者。默认情况下,它是此 IVisualElement 对象的父代。不过,如果此 IVisualElement 对象是由其父代弹出的一个子组件(如 ComboBox 控件的下拉列表),则所有者是弹出此 IVisualElement 对象的组件。 此属性并非由 Flex 管理,而由各个组件管理。因此,如果使用 PopUpManger.createPopUp() 或 PopUpManger.addPopUp() 方法弹出一个子组件,则应该将该子组件的 owner 属性设

2010-09-08 09:48:00 1345

原创 Flex函数一时糊涂

今天做项目,需要把itemRenderer里的data传递给外部的事件函数,不知道咋传,后来看了一下别人的代码。原来是我想的不周到灵活。

2010-09-07 16:21:00 1226

转载 Flex利用自定义事件使用弹出窗口为DataGrid添加新数据

<br />下面是TitleWindow所有代码:<br />Xml代码 <?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="348" height="218" title="Add A Note"> <mx:Metadata> [Event(name="SaveNote")] <

2010-09-07 15:38:00 963

原创 flex中自定义事件--------利用元数据标签

使用 标签在 MXML 文件中插入元数据标签。元数据标签向 Flex 编译器提供说明 MXML 组件在 Flex 应用程序中的使用方式的信息。元数据标签并不会编译到可执行代码中,而是提供信息来控制如何编译代码的各个部分。请注意,在 块中只能插入元数据标签;不能插入 MXML 或 ActionScript 代码。[Event("enableChange")] // Import Event class. import flash.events.Event;

2010-09-07 15:32:00 2151

转载 itemRender---之outerDocument : 使用itemRender 和item Editor时想要访问外部变量或方法的关键字

You use the tag to define an inline item renderer or item editor in an MXML file.The tag defines a new scope within an MXML file, where the local scope of the item renderer or item editor is defined by the MXML code block delimited by the and tags. To

2010-09-07 14:30:00 1845

转载 ItemRender---实例之动态计算表格中的一行结果

动态计算表格中的一行结果。

2010-09-06 09:13:00 1277

原创 Flex中Class类

Flex中的Class类和java的差不多,官方上说:为程序中的每个类定义创建一个 Class 对象。每个 Class 对象都是 Class 类的一个实例。Class 对象包含该类的静态属性和方法。在使用 new 运算符进行调用时,Class 对象会创建该类的实例。

2010-09-03 09:34:00 4744

转载 ItemRender---之使用ClassFactory生成渲染器

问题你想在运行时修改List或DataGridColumn所使用的渲染器的属性,将不同的属性设置给所有项目渲染器。解决方案使用ClassFactory对象作为Itemrenderer。ClassFactory实现了IFactory接口,你只要传一个类对象(即Class类型的对象)给它,它就可以生成这个类的对象。讨论 这种解决办法,使用了工厂设计模式,并且使用了flex的一些内部机制。在使用工厂模式时,你需要指定一个类型给工厂,这个类型的对象会被工厂类产生并作为渲染器使用,并且工厂类可以控制渲染器的生命周期。

2010-09-02 20:33:00 2426

转载 ItemRender---之理解 Flex itemRenderer - 状态和过渡

itemRenderer 最擅长与应用程序的用户通信。有时通信很简单, 只是显示一个名称;有时会使用更精致的颜色;有时具有交互性。状态 Flex 是更改 itemRenderer 外观的一个理想方法。状态使用简便, 并且与过渡结合使用时, 可以为用户提供反馈和愉悦的体验。Flex 是更改 itemRenderer 外观的一个理想方法。状态使用简便, 并且与过渡结合使用时, 可以为用户提供反馈和愉悦的体验。在本例中, 您将为列表新建一个 MXML itemRenderer(记住, 如果您愿意, 完全可以使

2010-09-02 17:53:00 2398

转载 ItemRender---之用 ActionScript类来编写itemRenderer

现在, 您将编写另一个 itemRenderer, 这次使用 ActionScript 类。在上一篇文章中, 有一个 TileList 包含这个内联 itemRenderer:

2010-09-02 17:35:00 2266 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除