搜索你感兴趣的问题
flash如何做透明渐变效果?
花太香 2019-04-04
分享
推荐回答
天比不过海的蓝 2022-01-19
设2曾第1层做一贞放图实例名起下qwe第2层做一贞写AS如下importflash.geom.Point;importflash.geom.Matrix;importflash.display.BitmapData;functioncreateRef(p_source:MovieClip){varbd:BitmapData=newBitmapData(p_source._width,p_source._height,true,0);varmtx:Matrix=newMatrix();mtx.d=-1;mtx.ty=bd.height;bd.draw(p_source,mtx);varwidth:Number=bd.width;varheight:Number=bd.height;mtx=newMatrix();mtx.createGradientBox(width,height,Math.PI/2,0,0);varshape:MovieClip=createEmptyMovieClip("shape",getNextHighestDepth());//进行线性填充shape.beginGradientFill("linear",[0,0],[60,0],[0,255],mtx);shape.lineTo(width,0);shape.lineTo(width,height);shape.lineTo(0,height);shape.endFill();shape._visible=false;varmask_bd:BitmapData=newBitmapData(width,height,true,0);mask_bd.draw(shape);bd.copyPixels(bd,bd.rectangle,newPoint(0,0),mask_bd,newPoint(0,0),false);varrefMC:MovieClip=createEmptyMovieClip("refMC",getNextHighestDepth());refMC._x=p_source._x;refMC._y=p_source._yp_source._height;refMC.attachBitmap(bd,0,"Auto",true);}createRef(qwe);
本网站引用、摘录或转载上述内容仅供网站访问者交流或参考,文中观点或信息与爱问公司无关,与之相关的任何事务以及法律责任均与爱问公司无关。
相关推荐
有问题 @爱问
Powered by iask.com