没有合适的资源?快使用搜索试试~ 我知道了~
flex利用actonscript自定义fade效果,循环一下,就可以实现闪烁的效果
资源推荐
资源详情
资源评论
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.core.UIComponent; // only needed if you use the second method
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
public var circle:Sprite;
public function init():void{
circle = new Sprite();
circle.graphics.beginFill(0x990000);
circle.graphics.drawCircle(50, 50, 50);
circle.graphics.endFill();
this.rawChildren.addChild(circle); // The quick and dirty method
/* OR YOU CAN DO THIS
var uic:UIComponent = new UIComponent();
uic.addChild(circle);
addChild(uic);
*/
circle.addEventListener(MouseEvent.CLICK, startAnimation); //Event.ENTER_FRAME
}
private function fadeCircle(event:Event):void{
circle.alpha -= .05;
if (circle.alpha <= 0){
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.core.UIComponent; // only needed if you use the second method
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
public var circle:Sprite;
public function init():void{
circle = new Sprite();
circle.graphics.beginFill(0x990000);
circle.graphics.drawCircle(50, 50, 50);
circle.graphics.endFill();
this.rawChildren.addChild(circle); // The quick and dirty method
/* OR YOU CAN DO THIS
var uic:UIComponent = new UIComponent();
uic.addChild(circle);
addChild(uic);
*/
circle.addEventListener(MouseEvent.CLICK, startAnimation); //Event.ENTER_FRAME
}
private function fadeCircle(event:Event):void{
circle.alpha -= .05;
if (circle.alpha <= 0){
资源评论
欧美噶
- 粉丝: 33
- 资源: 101
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功