- 浏览: 127976 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
lliiqiang:
NetConnection.Connect.Rejected拒 ...
第一个FMS程序,连接到FMS服务器(Flash/Flex两种实现) 转
index.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:local="*">
<mx:Script>
<![CDATA[
private function onClick(e:MouseEvent):void{
window.show();
}
]]>
</mx:Script>
<local:JellyWindow width="400" height="500" horizontalCenter="0" id="window"
backgroundColor="#ffff00" vibrationCount="30" delayNumber="0" visible="false"/>
<mx:Button x="157" y="244" label="show" width="91" height="33" click="onClick(event)" fontSize="14"/>
</mx:Application>
JellyWindow .as
package
{
import com.adobe.ac.mxeffects.Distortion;
import com.adobe.ac.mxeffects.DistortionConstants;
import flash.events.TimerEvent;
import flash.geom.Point;
import flash.utils.Timer;
import mx.containers.Canvas;
public class JellyWindow extends Canvas
{
private const InitPoint:Point = new Point(100,100);
public function JellyWindow()
{
super();
distortionTimeer = new Timer(delayNumber, vibrationCount);
distortionTimeer.addEventListener(TimerEvent.TIMER, timerHandler);
pointsSpecimen = [
50,55.251048395021485,67.86320984930961,83.2024901610665,97.44865698524941,
108.11123531529728,114.13278592010593,115.6794726556897,113.7514225333381,
109.74227285271256,105.04958100112648,100.79808814176877,97.69749345012417,
96.023554262826,95.69027018664536,96.37235141377161,97.63915519115437,
99.07033390929932,100.33572339218681,101.2341473366892,101.69546822829375,
101.75619974227371,101.52120076364723,101.12306421982154,100.68788141853504,
100.312273569012,100.05293362397794,99.9270920221492,99.92062845073377,100
];
for(var j : int=0;j<pointsSpecimen.length; j++)
{
pointsSpecimen[j] -= (pointsSpecimen[j] - 100)
* ( (pointsSpecimen[j] > 100) ? 0.85 : 0.7 );
}
}
private var distortion: Distortion;
private var currentPoint : Number = 0;
private var pointsSpecimen:Array;
private var pointsArray : Array;
private var distortionTimeer : Timer;
private var dyncDelayNumber : Number = delayNumber;
/**
* 窗口振动次数
*/
public var vibrationCount : Number = 15;
/**
* 振动间隔
*/
public var delayNumber : Number = 55;
private function timerHandler(evt : TimerEvent) : void
{
currentPoint++;
dyncDelayNumber = dyncDelayNumber + 0.5;
var leftTopPoint : Point = new Point(pointsArray[0][currentPoint], pointsArray[0][currentPoint]);
var rightTopPoint : Point = new Point(pointsArray[1][currentPoint], pointsArray[1][currentPoint]);
var rightBottomPoint : Point = new Point(pointsArray[2][currentPoint], pointsArray[2][currentPoint]);
var leftBottomPoint : Point = new Point(pointsArray[3][currentPoint], pointsArray[3][currentPoint]);
distortion.renderCorners(leftTopPoint, rightTopPoint, rightBottomPoint, leftBottomPoint);
if (currentPoint >= vibrationCount) {
reset();
}
}
private function reset():void {
if (distortion != null) {
distortion.destroy();
distortion = null;
}
dyncDelayNumber = delayNumber;
distortionTimeer.repeatCount = vibrationCount;
currentPoint = 0;
distortionTimeer.reset();
}
private function generatePointsArray(): void {
var tempPointsArr:Array = new Array(4);
var n1:Number;
var n2:Number;
var n3:Number;
var n4:Number;
pointsArray = new Array();
var pointNum : Number = pointNum = 0;
while (pointNum++ < 5) {
tempPointsArr = [];
n1 = Math.random() * 0.70 + 0.80;
n2 = 0;
while (n2++ <= vibrationCount) {
n4 = Math.round(n2 * n1);
if (n4 <= vibrationCount - 4) {
tempPointsArr.push(pointsSpecimen[n4]);
continue;
}
tempPointsArr.push(100);
}
pointsArray.push(tempPointsArr);
}
}
public function show():void
{
if (distortion != null) {
return;
}
visible = true;
distortion = new Distortion(this);
distortion.buildMode = DistortionConstants.POPUP;
distortion.smooth = true;
generatePointsArray();
distortionTimeer.repeatCount = vibrationCount;
distortionTimeer.start();
timerHandler(null);
}
public function hide():void
{
visible = false;
}
}
}
发表评论
-
Flex 对Java端返回Collection的处理方法
2010-07-20 22:21 1043将Flex与Spring集成后(BlazeDS 与Spring ... -
在文本框里添加超链接
2010-05-31 10:16 2153问题我想在文本框里加入超链接解决办法利用HTML <a ... -
BulkLoader类和PV3D
2010-05-31 10:06 882AS3取消了movieclip的loader类,所以加载图 ... -
Flex LinkButton仿IE超链接
2010-05-31 10:02 2964重写的LinkButton类Kelvin_LinkButt ... -
flex RSL做资源共享管理
2010-05-18 10:35 1042Flex SDK 里有一个运行时组件共享库——RSL ( Ru ... -
Flex 特效一部分 转
2010-05-12 14:24 14561:glow(发光) 代码: <mx:Glow id ... -
Flex3特效的基本用法 原理 转
2010-05-12 11:40 1256Flex3为开发人员提供了多种基本的特效控件,每种特效控件对应 ... -
Flex3特效的基本用法 特效组件 转
2010-05-12 11:34 1304Flex3中预定义了多种特效组件,每种组件对应于一种或多种特效 ... -
FLEX3中应用CSS完全详解手册! 转
2010-05-11 16:44 846在FLEX中使用样式方法一、使用本地样式定义使用<mx: ... -
Flex加载图片的常用的几种方式 转
2010-05-11 15:17 757<?xml version="1.0&qu ... -
flex特效 触发器
2010-04-30 16:00 1149触发器在Flex3的特效实现中起着重要作用,对于Flex3中的 ... -
数据筛选(转)
2010-04-15 17:16 689<?xml version="1.0" ... -
在数组首部和尾部添加元素(转)
2010-04-15 17:01 3182要再添加新元素到数组解决办法push( ) 方法在数组尾部添加 ... -
遍历数组成员(转)
2010-04-15 17:00 844要访问数组的每个元素 ... -
搜索匹配的数组元素(转)
2010-04-15 16:58 1030要找出指定值得数组元 ... -
.删除数组元素(转)
2010-04-15 16:56 1406要删除一个或多个数组元素,或移动数组元素解决办法splice( ... -
在数组中间插入元素(转)
2010-04-15 16:53 2128要在数组中间插入元素解决办法使用splice( ) 方法讨论s ... -
读取关联数组(转)
2010-04-15 16:50 816怎样遍历关联数组解决办法使用for . . . in 语句讨论 ... -
创建关联数组(转)
2010-04-15 16:48 917要创建用名称元素作为索引的数组解决办法创建关联数组讨论用关联数 ... -
比较数组(转)
2010-04-15 16:45 902怎么判断两个数组是否相等呢解决办法循环数组,一一比较对应位置的 ...
相关推荐
本例是实现了Flex的果冻特效,比如在弹出窗口或者转换页面时主能使用,超级有意思
FLEX网页果冻窗口效果(附拖动功能)FLEX网页果冻窗口效果(附拖动功能)FLEX网页果冻窗口效果(附拖动功能)FLEX网页果冻窗口效果(附拖动功能)FLEX网页果冻窗口效果(附拖动功能)FLEX网页果冻窗口效果(附拖动...
HTML网页制作的一个小特效,可以让页面显示更加美化 、
纯CSS3弹性果冻动画特效是一款通过圆周运动不断变换的弹性动画特效。
css3弹性果冻按钮动画特效是一款基于js跟css3实现的带动画效果的按钮切换特效。
纯css3实现带有弹性的果冻动画特效源码.zip
css3弹性果冻按钮动画特效是一款基于js跟css3实现的带动画效果的按钮切换特效。
js+css3制作弹性果冻按钮动画特效源码.zip
纯CSS3弹性果冻动画特效是一款通过圆周运动不断变换的弹性动画特效。
纯CSS3弹性果冻动画特效是一款通过圆周运动不断变换的弹性动画特效。
可以模拟可拖拽,可点击,可挤压的果冻之类的柔体效果的插件。unity package使用时拖入unity工程即可。
此程序是采用Flex技术,as3代码编写,展示图片2D特效,果冻弹窗,动态加载图片,支持XML数据解析,和JAVA整合WEB系统。
果冻刷机 v2.0.3 版本:2.0.3 软件语言:中文 软件类别:刷机工具 软件大小:1.64 MB 适用固件:2.3及更高固件 内置广告:没有广告 适用平台:Android 果冻刷机是一款安卓刷机软件,只需一个按钮就可完成安卓手机...
jquery果冻抖动效果是一款动态鼠标响应式抖动特效。
易语言智圆行方的果冻窗口源码,智圆行方的果冻窗口,设置窗口区域_
仿百度外卖果冻效果