- 浏览: 398774 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (325)
- 神经网络 (1)
- javascript (11)
- 数据结构 (2)
- 计算机图形学 (11)
- 模式识别 (1)
- 前端开发 (14)
- 机器学习 (11)
- ios开发 (50)
- Python (9)
- HTML5 (4)
- 计算机视觉 (9)
- 数字图像处理 (7)
- 架构设计 (19)
- 数据库设计 (9)
- 算法设计 (59)
- Java (37)
- 其他 (3)
- 游戏开发 (5)
- c++ (17)
- Linux (3)
- TCP/IP (2)
- Flex (41)
- 健康 (6)
- AI (2)
- 工具 (1)
- 数据挖掘 (1)
- 性能优化 (6)
- 综合 (2)
- 网络通信 (12)
- Android (2)
- UML (3)
- 软件设计 (11)
- 编程经验 (7)
- J2EE (1)
- 多媒体技术 (3)
- 数学 (7)
- php (4)
- 设计 (1)
- CS (2)
- 计算机理论 (1)
- 信息安全 (1)
最新评论
-
ahead_zhan:
good good good
flex3控件_ModuleLoader -
lonerzf:
好样的。非常感谢楼主
OpenCV视频教程整理 -
lonerzf:
好样的。谢谢~
OpenCV视频教程整理 -
coding1688:
博主说的不错,我在实现瀑布流布局时也用的masonry插件,有 ...
Javascript 瀑布流式布局及其动态效果的实现 -
snowolf:
除非玩游戏,不然没啥win的事情,或者用win的银行客户端,通 ...
macbook安装操作系统的机理分析
1、演示 State 的应用
State.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300"
title="State (状态的应用)">
<mx:states>
<mx:State name="state2">
<!--
<mx:AddChild /> - 在指定的关联控件的指定位置新增指定的控件
relativeTo - 关联的控件
position - 在关联控件的指定位置增加控件
关联控件为元素类型则此处可能的值为:before 或 after
关联控件为集合类型则此处可能的值为:firstChild 或 lastChild
<mx:SetProperty /> - 设置指定控件的某属性的值
<mx:RemoveChild /> - 移除指定的控件
-->
<mx:AddChild relativeTo="{form}" position="lastChild">
<mx:FormItem label="Label2:">
<mx:TextInput/>
</mx:FormItem>
</mx:AddChild>
<mx:SetProperty target="{panel}" name="title" value="状态2"/>
<mx:RemoveChild target="{toggle}"/>
<mx:AddChild relativeTo="{bar}" position="firstChild">
<!--
设置状态为空,即转换到原始状态
-->
<mx:LinkButton label="转换到状态1" click="this.currentState=''"/>
</mx:AddChild>
</mx:State>
</mx:states>
<!--
以下为 状态1 的 ui
-->
<mx:Panel id="panel" title="状态1">
<mx:Form id="form">
<mx:FormItem label="Label1:">
<mx:TextInput/>
</mx:FormItem>
</mx:Form>
<mx:ControlBar id="bar">
<!--
ui 状态转换到名为 state2 的 <mx:State />
-->
<mx:LinkButton id="toggle" label="转换到状态2" click="this.currentState='state2'" />
</mx:ControlBar>
</mx:Panel>
</mx:Panel>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300"
title="State (状态的应用)">
<mx:states>
<mx:State name="state2">
<!--
<mx:AddChild /> - 在指定的关联控件的指定位置新增指定的控件
relativeTo - 关联的控件
position - 在关联控件的指定位置增加控件
关联控件为元素类型则此处可能的值为:before 或 after
关联控件为集合类型则此处可能的值为:firstChild 或 lastChild
<mx:SetProperty /> - 设置指定控件的某属性的值
<mx:RemoveChild /> - 移除指定的控件
-->
<mx:AddChild relativeTo="{form}" position="lastChild">
<mx:FormItem label="Label2:">
<mx:TextInput/>
</mx:FormItem>
</mx:AddChild>
<mx:SetProperty target="{panel}" name="title" value="状态2"/>
<mx:RemoveChild target="{toggle}"/>
<mx:AddChild relativeTo="{bar}" position="firstChild">
<!--
设置状态为空,即转换到原始状态
-->
<mx:LinkButton label="转换到状态1" click="this.currentState=''"/>
</mx:AddChild>
</mx:State>
</mx:states>
<!--
以下为 状态1 的 ui
-->
<mx:Panel id="panel" title="状态1">
<mx:Form id="form">
<mx:FormItem label="Label1:">
<mx:TextInput/>
</mx:FormItem>
</mx:Form>
<mx:ControlBar id="bar">
<!--
ui 状态转换到名为 state2 的 <mx:State />
-->
<mx:LinkButton id="toggle" label="转换到状态2" click="this.currentState='state2'" />
</mx:ControlBar>
</mx:Panel>
</mx:Panel>
2、演示 State Transition 的应用
StateTransition.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300"
title="State Transition (状态过渡的应用)">
<mx:Script>
<![CDATA[
import mx.effects.easing.Bounce;
]]>
</mx:Script>
<!--
<mx:Transition /> - 用于设置状态转换间的过渡效果
-->
<mx:transitions>
<mx:Transition>
<mx:Parallel targets="{[panel, toogleTo1, toogleTo2, formItem]}">
<mx:Resize duration="500" easingFunction="Bounce.easeOut"/>
<mx:Sequence target="{formItem}">
<mx:Blur duration="200" blurYFrom="1.0" blurYTo="20.0"/>
<mx:Blur duration="200" blurYFrom="20.0" blurYTo="1"/>
</mx:Sequence>
</mx:Parallel>
</mx:Transition>
</mx:transitions>
<!--
以下关于状态转换的部分参见 State.mxml
-->
<mx:states>
<mx:State name="state2">
<mx:AddChild relativeTo="{form}" position="lastChild">
<mx:FormItem id="formItem" label="Label2:">
<mx:TextInput/>
</mx:FormItem>
</mx:AddChild>
<mx:SetProperty target="{panel}" name="title" value="状态2"/>
<mx:RemoveChild target="{toogleTo2}"/>
<mx:AddChild relativeTo="{bar}" position="firstChild">
<mx:LinkButton id="toogleTo1" label="转换到状态1" click="this.currentState=''"/>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Panel id="panel" title="状态1">
<mx:Form id="form">
<mx:FormItem label="Label1:">
<mx:TextInput/>
</mx:FormItem>
</mx:Form>
<mx:ControlBar id="bar">
<mx:LinkButton id="toogleTo2" label="转换到状态2" click="this.currentState='state2'" />
</mx:ControlBar>
</mx:Panel>
</mx:Panel>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300"
title="State Transition (状态过渡的应用)">
<mx:Script>
<![CDATA[
import mx.effects.easing.Bounce;
]]>
</mx:Script>
<!--
<mx:Transition /> - 用于设置状态转换间的过渡效果
-->
<mx:transitions>
<mx:Transition>
<mx:Parallel targets="{[panel, toogleTo1, toogleTo2, formItem]}">
<mx:Resize duration="500" easingFunction="Bounce.easeOut"/>
<mx:Sequence target="{formItem}">
<mx:Blur duration="200" blurYFrom="1.0" blurYTo="20.0"/>
<mx:Blur duration="200" blurYFrom="20.0" blurYTo="1"/>
</mx:Sequence>
</mx:Parallel>
</mx:Transition>
</mx:transitions>
<!--
以下关于状态转换的部分参见 State.mxml
-->
<mx:states>
<mx:State name="state2">
<mx:AddChild relativeTo="{form}" position="lastChild">
<mx:FormItem id="formItem" label="Label2:">
<mx:TextInput/>
</mx:FormItem>
</mx:AddChild>
<mx:SetProperty target="{panel}" name="title" value="状态2"/>
<mx:RemoveChild target="{toogleTo2}"/>
<mx:AddChild relativeTo="{bar}" position="firstChild">
<mx:LinkButton id="toogleTo1" label="转换到状态1" click="this.currentState=''"/>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Panel id="panel" title="状态1">
<mx:Form id="form">
<mx:FormItem label="Label1:">
<mx:TextInput/>
</mx:FormItem>
</mx:Form>
<mx:ControlBar id="bar">
<mx:LinkButton id="toogleTo2" label="转换到状态2" click="this.currentState='state2'" />
</mx:ControlBar>
</mx:Panel>
</mx:Panel>
3、演示如何自定义鼠标指针
Cursor.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300"
title="Cursor 自定义鼠标指针">
<mx:Script>
<![CDATA[
import mx.managers.CursorManager;
// 以 类 的形式引用内嵌资源。(另一种以字符串的形式引用内嵌资源的方式:@Embed('images/logo.png'))
[Embed(source="images/logo.png")]
private var customCursor:Class;
private function cursorChange(e:Event):void
{
switch (radioGroup.selectedValue)
{
// 正常时候的鼠标指针
case "Normal" :
CursorManager.removeAllCursors();
break;
// 繁忙时,鼠标指针的样式
case "Busy" :
CursorManager.removeAllCursors();
CursorManager.setBusyCursor();
break;
// 自定义鼠标指针的样式
case "Custom" :
CursorManager.removeAllCursors();
CursorManager.setCursor(customCursor);
default :
break;
}
}
]]>
</mx:Script>
<mx:RadioButtonGroup id="radioGroup" change="cursorChange(event);"/>
<mx:RadioButton x="10" y="10" label="普通指针" value="Normal" groupName="radioGroup" selected="true"/>
<mx:RadioButton x="10" y="36" label="繁忙指针" value="Busy" groupName="radioGroup"/>
<mx:RadioButton x="10" y="62" label="自定义指针" value="Custom" groupName="radioGroup"/>
</mx:Panel>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300"
title="Cursor 自定义鼠标指针">
<mx:Script>
<![CDATA[
import mx.managers.CursorManager;
// 以 类 的形式引用内嵌资源。(另一种以字符串的形式引用内嵌资源的方式:@Embed('images/logo.png'))
[Embed(source="images/logo.png")]
private var customCursor:Class;
private function cursorChange(e:Event):void
{
switch (radioGroup.selectedValue)
{
// 正常时候的鼠标指针
case "Normal" :
CursorManager.removeAllCursors();
break;
// 繁忙时,鼠标指针的样式
case "Busy" :
CursorManager.removeAllCursors();
CursorManager.setBusyCursor();
break;
// 自定义鼠标指针的样式
case "Custom" :
CursorManager.removeAllCursors();
CursorManager.setCursor(customCursor);
default :
break;
}
}
]]>
</mx:Script>
<mx:RadioButtonGroup id="radioGroup" change="cursorChange(event);"/>
<mx:RadioButton x="10" y="10" label="普通指针" value="Normal" groupName="radioGroup" selected="true"/>
<mx:RadioButton x="10" y="36" label="繁忙指针" value="Busy" groupName="radioGroup"/>
<mx:RadioButton x="10" y="62" label="自定义指针" value="Custom" groupName="radioGroup"/>
</mx:Panel>
发表评论
-
nginx上搭建HLS流媒体服务器
2013-07-28 13:31 1354转自:http://blog.csdn.net/ ... -
ActionScript最新3D引擎项目(转载)
2012-10-23 19:11 8383D引擎 注:对于3D引擎,渲染的效率和支持的渲染功 ... -
Flash 3D的相关文章推荐
2012-10-12 15:18 0Flash ActionScript 3.0的3D效果处 ... -
深入浅出了解Molehill的底层API-顶点着色器与片段着色器
2012-10-12 11:07 1206转自:http://www.adob ... -
ActionScript 3 和 Flex框架的性能优化
2012-08-29 09:33 737与其在程序写完了之后臃肿得跑不动,不如平时注意这些关键点,时时 ... -
BlazeDS的架构和工作原理简介
2012-06-02 14:09 859参考:http://hi.baidu.com/whlxj ... -
Flex性能优化常用手法总结
2011-06-04 10:29 835参考:http://www.webgamei.com/c ... -
浅谈AMF协议的优与劣
2011-06-03 16:33 1126参考:http://www.router.net.cn/Art ... -
FLASH/ActionScript 性能优化
2011-05-31 21:41 1169一. 图形方面的优化 1. 减少同时在屏幕上物体的个 ... -
FLEX4 中SKINCLASS使用PATH绘制多边形
2011-05-28 18:08 790skinClass中绘制多边形使用Path标签,把绘制 ... -
ActionScript 3 和 Flex框架的性能优化
2011-05-27 16:28 6951 创建新数组时避免使用它的构造函数。 这样做:var a ... -
Flex垃圾回收的一些知识总结
2011-05-27 16:27 827Flex垃圾回收的一些知识 ... -
ActionScript 3.0 性能优化小知识
2011-05-27 16:26 6571、改进算法无论对 ... -
34个有用的ActionScript 3.0的API
2011-05-21 14:20 906ArcGIS API for FlexArcGIS API ... -
ActionScript与Java类型对应表
2011-05-21 09:46 1018当你使用AMF格式进行RemoteObject 调用时,肯定会 ... -
flex 效果
2011-05-19 17:41 7471.旋转 效果:http://www.alex-uh ... -
基于red5的在线视频录制实例和详细注释
2011-05-14 23:03 1556参考:http://www.ccvita.com/130.ht ... -
Converting data from Java to ActionScript
2011-05-07 14:23 950On the client side, the ide ... -
actionscript 3.0 图像处理(通道篇)
2011-05-06 10:30 970问题:1、将图片的R,G,B通道分别分离出来,以RGB模式, ... -
flex弹出窗口与父窗口的交互实现(用回调函数)
2011-04-16 17:46 2123弹出子窗口代码: protected function ad ...
相关推荐
精通Flex 3.0――14.1.2 ActionScript与Java数据类型的转换 精通Flex 3.0――14.1.3 LCDS的内容结构 精通Flex 3.0――14.2 一个最基本的LCDS应用 精通Flex 3.0――14.3 通过Remoting访问服务端的应用 精通Flex 3.0―...
Flex3.0面试题Flex3.0面试题Flex3.0面试题Flex3.0面试题Flex3.0面试题
Flex3.0学习版快速入门提高版,简单轻松,操作容易。学习简单,很清楚地描述了怎么从零凯斯学习Flex的开发。
完全自学flex3.0随书源码,目前正在学,随后上传学习笔记及实例.
精通flex3.0 精通 Flex3.0 LCDS ActionScript 事件
flex3.0资源flex3.0资源flex3.0资源flex3.0资源flex3.0资源
精通Flex 3.0--基于ActionScript 3.0实现源码
ArcGIS API for Flex 3.0离线文档
FLASH-FLEX3.0开发教程中文版(例子源码)
由于上传限制在15M,所以只有打包成四个……资源来自网络,仅供学习参考。 //[完全手册Flex3.0RIA开发.part2/4.rar
《精通Flex 3.0——基于ActionScript 3.0实现》一书源代码。 Flex 3.0 ActionScript 3.0源代码 Flex 3.0源代码。 --------------------------- 第1篇 Flex技术概述 第1章 Flex概述 3 1.1 Flex简介 3 1.2 Flex...
FLEX 3.0程序开发技术详解(下).pdf
flex3.0资源1flex3.0资源1flex3.0资源1
Flex ActionJscript 3.0中文帮助[pdf]
flex3.0 中文帮助文档 对于英语不太好的朋友是个不错的帮助哦!!
Flex3.0中文帮助文档part2.............
关于flex3.0的中英文学习资料,有兴趣的可以看看
想学习flex技术的同学多多捧场 很实用的教程
Flex3.0中文帮助文档,欢迎下载使用
ArcGIS Viewer for Flex 3.0源码