AS3位图过渡效果简单实用
转自:http://www.5ga.cn/blog/archives/2009/11/1813/ (含效果)
private function bitmaptest():void {
bitmapDataTemp.lock();bitmapDataTemp.threshold(bitmapData2,bitmapData2.rect,new Point(),">", getI(), 0,0x000000FF,true);
bitmapDataTemp.unlock();
i++;
}
private function getI():uint {
if(Math.floor(i/0xff)%2) {//1,递减
return 0xff-i%0xff;
}else {//0 返回值递增
return i%0xff;
}
}
本文介绍了一种使用ActionScript 3 (AS3) 实现的简单而实用的位图过渡效果。通过调整像素阈值实现渐变效果,示例代码展示了如何在两个位图间平滑过渡。
1234

被折叠的 条评论
为什么被折叠?



