- 浏览: 420279 次
- 性别:
- 来自: 济南
-
最新评论
-
nianshi:
slideDown就是show的滑动效果版本, slideUp ...
Jquery零碎代码收藏 -
nianshi:
以后编写JS代码,少写<div onclick=&quo ...
Jquery零碎代码收藏 -
nianshi:
获取匹配元素相对父元素的偏移var p = $("p ...
Jquery零碎代码收藏 -
nianshi:
获取匹配元素在当前窗口的相对偏移var p = $(" ...
Jquery零碎代码收藏 -
wuchu:
谢谢
Flex 读取XML配置文件总结
以下是今天做的Flex的一些效果,其中最后四个。WipeLeft,Right,Up,Down,比较实用,做的过程中收获很大。
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" minWidth="955" minHeight="600" click="application1_clickHandler(event)">
<mx:Script>
<![CDATA[
import mx.events.EffectEvent;
import mx.events.FlexEvent;
public var fangxiang:int=0;
protected function myBtn_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
myBlur.play();
}
protected function button1_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
myMove.play();
}
protected function button2_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
if(myPnl.visible)
{
myPnl.setStyle("hideEffect",myFadeOut);
myPnl.visible=false;
}
else
{
myPnl.setStyle("showEffect",myFadeIn);
myPnl.visible=true;
}
}
protected function button3_mouseDownHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
myGlowDown.play();
}
protected function button3_mouseUpHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
myGlowUp.play();
}
protected function button4_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
myResize1.addEventListener(EffectEvent.EFFECT_END,onend);
myResize1.play();
}
protected function onend(event:EffectEvent):void
{
myResize2.play();
}
protected function button5_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
myRotate.play();
}
protected function button6_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
myZoom.play();
}
protected function button7_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
if(myPnl.visible)
{
myPnl.setStyle("hideEffect",myWipeLeft);
myPnl.visible=false;
}
else
{
myPnl.setStyle("showEffect",myWipeRight);
myPnl.visible=true;
}
this.fangxiang=1;
//myWipeLeft.play();
}
protected function button8_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
if(myPnl.visible)
{
myPnl.setStyle("hideEffect",myWipeRight);
myPnl.visible=false;
}
else
{
myPnl.setStyle("showEffect",myWipeLeft);
myPnl.visible=true;
}
this.fangxiang=2;
}
protected function button9_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
if(myPnl.visible)
{
myPnl.setStyle("hideEffect",myWipeUp);
myPnl.visible=false;
}
else
{
myPnl.setStyle("showEffect",myWipeDown);
myPnl.visible=true;
}
this.fangxiang=3;
}
protected function button10_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
if(myPnl.visible)
{
myPnl.setStyle("hideEffect",myWipeDown);
myPnl.visible=false;
}
else
{
myPnl.setStyle("showEffect",myWipeUp);
myPnl.visible=true;
}
this.fangxiang=4;
}
protected function button11_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
if(myPnl.visible)
{
myPnl.setStyle("hideEffect",myWipeUp);
myPnl.visible=false;
}
else
{
myPnl.setStyle("showEffect",myWipeDown);
myPnl.visible=true;
}
}
protected function application1_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
if(event.target is Button)
{
return;
}
switch(fangxiang)
{
case 1 :
myPnl.setStyle("hideEffect",myWipeLeft);
myPnl.visible=false;
break;
case 2 :
myPnl.setStyle("hideEffect",myWipeRight);
myPnl.visible=false;
break;
case 3 :
myPnl.setStyle("hideEffect",myWipeUp);
myPnl.visible=false;
break;
case 4 :
myPnl.setStyle("hideEffect",myWipeDown);
myPnl.visible=false;
break;
}
}
]]>
</mx:Script>
<mx:Blur id="myBlur" target="{myPnl}" blurXFrom="20.0" blurXTo="0.0" duration="1000" >
</mx:Blur>
<mx:Move id="myMove" target="{myPnl}" xFrom="-250" xTo="0" duration="1000">
</mx:Move>
<mx:Fade id="myFadeOut" target="{myPnl}" alphaFrom="1.0" alphaTo="0.0" duration="1000">
</mx:Fade>
<mx:Fade id="myFadeIn" target="{myPnl}" alphaFrom="0.0" alphaTo="1.0" duration="1000">
</mx:Fade>
<mx:Glow id="myGlowDown" target="{myPnl}" alphaFrom="1.0" alphaTo="0.1" duration="500" color="#FF3b00" >
</mx:Glow>
<mx:Glow id="myGlowUp" target="{myPnl}" alphaFrom="0.1" alphaTo="1.0" duration="1000" color="#FF3b00" >
</mx:Glow>
<mx:Resize id="myResize1" target="{myPnl}" widthFrom="250" widthTo="500" duration="2000" >
</mx:Resize>
<mx:Resize id="myResize2" target="{myPnl}" widthFrom="500" widthTo="250" duration="2000" >
</mx:Resize>
<mx:Rotate id="myRotate" target="{myPnl}" angleFrom="0" angleTo="180" duration="1000">
</mx:Rotate>
<mx:Zoom id="myZoom" target="{myPnl}" zoomWidthFrom="1"
zoomWidthTo="0.5" zoomHeightFrom="1" zoomHeightTo="0.5"
duration="1000">
</mx:Zoom>
<mx:WipeLeft id="myWipeLeft" duration="1000" >
</mx:WipeLeft>
<mx:WipeRight id="myWipeRight" duration="1000" >
</mx:WipeRight>
<mx:WipeUp id="myWipeUp" duration="1000">
</mx:WipeUp>
<mx:WipeDown id="myWipeDown" duration="1000">
</mx:WipeDown>
<mx:Button x="31" y="46" label="Blur" id="myBtn" click="myBtn_clickHandler(event)"/>
<mx:Panel x="0" y="210" width="250" height="200" layout="absolute" id="myPnl" visible="false" >
<mx:Label x="33" y="31" text="标签" width="119" height="74"/>
<mx:Button x="182" y="0" label="关闭" click="button11_clickHandler(event)"/>
</mx:Panel>
<mx:Button x="99" y="46" label="Move" click="button1_clickHandler(event)"/>
<mx:Button x="176" y="46" label="Fade" click="button2_clickHandler(event)"/>
<mx:Button x="247" y="46" label="Glow"
mouseDown="button3_mouseDownHandler(event)"
mouseUp="button3_mouseUpHandler(event)"/>
<mx:Button x="322" y="46" label="Resize" click="button4_clickHandler(event)"/>
<mx:Button x="404" y="46" label="Rotate" click="button5_clickHandler(event)"/>
<mx:Button x="494" y="46" label="Zoom" click="button6_clickHandler(event)"/>
<mx:Button x="32" y="116" label="WipeLeft" click="button7_clickHandler(event)"/>
<mx:Button x="127" y="116" label="WipeRight" click="button8_clickHandler(event)"/>
<mx:Button x="232" y="116" label="WipeUp" click="button9_clickHandler(event)"/>
<mx:Button x="322" y="116" label="WipeDown" click="button10_clickHandler(event)"/>
<mx:Panel x="463" y="330" width="250" height="200" layout="absolute">
</mx:Panel>
</mx:Application>
发表评论
-
Flex小记录
2011-02-24 10:18 1305Flex读取XML: <mx:HTTPServic ... -
flex实现滑动显示隐藏效果
2010-12-30 15:30 1612鼠标划过的时候显示菜单栏 ,鼠标移开后隐藏菜单栏。比较常用 ... -
flex DataTimePicker时间控件
2010-12-27 11:54 1325两种DatatimePicker: 1.Datatim ... -
ActionScript 生成伪Guid
2010-12-24 09:52 1221在一个Flash制作的图片上传程序中(使用了FileRefer ... -
Flex中Image组件怎么才能非等比例拉伸图片
2010-12-23 15:49 1519Image组件怎么才能非等比例拉伸图片 设 ... -
Flex中Accordion用法
2010-12-23 11:45 3091<? xml version = & ... -
Flex(替代session过期)实现用户长时间不操作要求重新登录的处理
2010-12-23 11:08 1515flex(替代session过期)用户长时间不操作要求重新登录 ... -
ActionScript 3.0 Socket编程
2010-12-23 09:56 1187在使用ActionScript3.0进行编程 ... -
12个简单易用的flex函数
2010-12-21 10:10 11521.拷贝内容到剪贴板: ... -
Flex自定义控件——Pagebar分页控件
2010-12-20 09:41 5274开发时经常遇到用一个DataGrid分页显示 ... -
Flex资源,很全,很牛!
2010-12-20 09:30 14721、as3ebaylib http://code ... -
Flex 窗体 最大化、最小化实例
2010-12-20 09:28 2726---导入flexMdi.swc (http ... -
在Flex中复制文字到操作系统的剪贴板
2010-12-15 11:18 1253这个实例演示了怎么样使用System. ... -
Flex让Slider控件拖动时显示Tooltip
2010-12-14 16:10 1923格式化与自定义Slider中显示的Tooltip ... -
Flex给Alert加个Icon
2010-12-14 16:05 1290给Alert加个Icon 很简单只要先 Embed 一 ... -
在Flex中用Validator验证数字、字符串、Email、电话号码等
2010-12-14 09:54 4332mx.validators ... -
Flex中使用FileReference类下载文件
2010-12-14 09:47 1802下面的实例演示了Flex中的 File ... -
Flex使用ArrayCollection的filterFunction属性过滤DataGrid
2010-12-14 09:42 1814下面的实例演示了在Flex中怎样使用 ... -
Flex 树形控件(Tree )的使用
2010-12-13 16:24 3483一、树形控件的常用属性 1、dragMoveE ... -
FLEX3中应用CSS完全详解手册(下)
2010-12-13 11:40 890myTabs中的设置 cornerRadiusTab ...
相关推荐
例如,可以使用 `Sequence` 效果串联 `Zoom`、`Fade` 和 `Move`,以实现组件的放大、淡入和位置移动的连续动画。此外,使用 `Parallel` 效果可以让多个组件同时执行不同的动画,提升用户体验。 总之,Flex 3.0 的...
Flex提供的内置效果包括但不限于模糊(Blur)、移动(Move)、淡入淡出(Fade)、发光(Glow)、调整大小(Resize)、旋转(Rotate)和缩放(Zoom)等。此外,还有Wipe系列效果用于实现画面的遮罩效果,如WipeLeft、...
本文档是针对Flex和Java初学者的学习笔记,涵盖了Flex中的基础组件、文本处理、样式设计、行为对象以及动画效果。 一、Flex基础组件 1. Button:按钮组件,可以设置文字和图标,图标通过`icon="@Embed('图片路径')...
`<mx:Transition>`用于实现不同状态间的过渡动画,例如页面间的过渡效果等。 #### 二、图表绘制 除了基础的动画效果外,Flex还提供了丰富的图表绘制功能,帮助开发者快速构建数据可视化应用。 ##### 1. AreaChart...
Flex特效是富互联网应用程序(RIA)开发中的一个重要组成部分,它为用户界面增添了许多生动和吸引人的视觉效果。本文将深入探讨Flex特效的使用方法、播放流程、常见效果类以及触发这些效果的方式,并通过实例演示...
- **WipeDown、WipeLeft、WipeRight、WipeUp**: 各种擦拭效果。 - **Zoom**: 缩放效果。 - **ViewStates**: 视图状态管理,例如用户登录和注册界面的状态切换。 - **Transitions**: 在不同视图之间添加过渡效果。 ...
- **WipeDown/WipeLeft/WipeRight/WipeUp** - 清除动画效果。 - **Zoom** - 缩放效果。 ##### 2. **ViewStates** - **State** - 用户登录及注册的状态管理。 ##### 3. **Transitions** - **Transition** - 过渡...