详细内容
 
当前位置
flash制作镜面动画效果
作者:管理员    发布于:2012-03-03 18:48:56    文字:【】【】【
 
flash制作镜面动画效果代码如下:
import flash.display.BitmapData;
import flash.geom.Matrix;
import com_zszen.spirit.create;
function mirror(mc:MovieClip,objSet:Object, newMC:String, type:String) {
var bd:BitmapData = new BitmapData(objSet.width, objSet.height, true, 0);
var tmc:MovieClip = create.Movie(mc._parent, newMC);
var bmc:MovieClip = create.Movie(tmc, "mc");
bd.draw(mc);
bmc.attachBitmap(bd, 1);
switch (type) {
case "h" :
  bmc._x =objSet.width
  bmc._xscale = -100;
  break;
case "v" :
  bmc._y = objSet.height
  bmc._yscale = -100;
  break;
case "hv" :
  bmc._x = objSet.width
  bmc._xscale = -100;
  bmc._y =objSet.height
  bmc._yscale = -100;
  break;
case "vh" :
  bmc._x =objSet.width
  bmc._xscale = -100;
  bmc._y =objSet.height
  bmc._yscale = -100;
  break;
default :
}
return tmc;
}
onEnterFrame=function () {
var tmc = mirror(mc,{width:120,height:106}, "mirrorMe", "h");
tmc._x = mc._x+119;
tmc._y = mc._y;
var tmc = mirror(mc,{width:120,height:106}, "mirrorMe2", "v");
tmc._x = mc._x;
tmc._y = mc._y+105;
var tmc = mirror(mc,{width:120,height:106}, "mirrorMe3", "hv");
tmc._x = mc._x+119
tmc._y = mc._y+105;
};
脚注信息
版权所有 Copyright(C)2008-2015 龙腾动画(北京龙腾创星科技有限公司) 京ICP备16063988号-3       本站关键词:flash动画制作 

 
QQ在线咨询
咨询热线
010-57477990
7*24咨询热线
13701141129