为了账号安全,请及时绑定邮箱和手机立即绑定

麻烦大佬帮忙看看,关于flash as 按钮的on(release)事件的问题!

麻烦大佬帮忙看看,关于flash as 按钮的on(release)事件的问题!

C++ C
呼啦一阵风 2021-09-09 17:07:41
on(release) {var filter = (new flash.filters.GlowFilter());filter["color"] = random(16000000);yuanjian.filters = [filter];var i = 1;var j = 0.1;filter.blurX = filter.blurX+i;filter.blurY = filter.blurY+i;filter["color"] = random(16000000);filter.alpha = filter.alpha+j;yuanjian.filters = [filter];}这段代码写在按钮元件yuanjian上,想要改变自身的发光滤镜但测试时单击按钮始终未能执行,望指点...
查看完整描述

1 回答

?
紫衣仙女

TA贡献1839条经验 获得超15个赞

//抱歉你写的代码我无法修改.既然你要按钮点击有发光滤镜变化,下面的代码是我帮你重写的...复制到帧上就行了.按钮名rect
import flash.filters.GlowFilter;
var color:Number = 0x33CCFF;
var alpha:Number = 0.8;
var blurX:Number = 35;
var blurY:Number = 35;
var strength:Number = 2;
var quality:Number = 3;
var inner:Boolean = false;
var knockout:Boolean = false;
var qw;
rect.onPress = function() {
qw = random(5);
//下面变量的算法你如果有兴趣可自己改着玩下
var filter:GlowFilter = new GlowFilter(color*qw, alpha*qw+50, blurX*qw, blurY*qw, strength*qw, quality, inner, knockout);
var filterArray:Array = new Array();
filterArray.push(filter);
this.filters = filterArray;
};



查看完整回答
反对 回复 2021-09-13
  • 1 回答
  • 0 关注
  • 233 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信