flash如何做透明渐变效果?
设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);