代码如下: //库里有两个元件,一个图像cool,一个图形mc_2 import flash.display.*; import flash.geom.*; size_w=550; size_h=400; var basepoint = new flash.geom.Point(0,0); var tempbmp = flash.display.BitmapData.loadBitmap("cool"); mc=_root.createEmptyMovieClip("t_mc",getNextHighestDepth()) ma = new flash.display.BitmapData(size_w,size_h) juxing=new flash.geom.Rectangle(0,0,size_w,size_h) ma.copyPixels(tempbmp,juxing, basepoint); t_mc.attachBitmap(ma,getNextHighestDepth()) this.attachMovie("mc_2", "mc_2", this.getNextHighestDepth(), {_x:200, _y:100}); var myMatrix:Matrix = new Matrix(); var translateMatrix:Matrix = new Matrix(); translateMatrix.translate(200, 15); myMatrix.concat(translateMatrix); var myColorTransform:ColorTransform = new ColorTransform(0, 0, 1,0.5, 255, 255, 255, 0);//设置颜色、透明度 var blendMode:String = "normal";//设置混合类型 var myRectangle:Rectangle = new Rectangle(0, 0, 500, 300);//设置区域大小 var smooth:Boolean = true; t_mc.onPress = function() { mc_2._visible=false; ma.draw(mc_2, myMatrix, myColorTransform, blendMode, myRectangle, smooth); } |
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |