加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flash as 让影片剪辑按指定坐标旋转指定的角度

发布时间:2020-12-15 18:15:17 所属栏目:百科 来源:网络整理
导读:http://blog.sina.com.cn/s/blog_50e610900100oh5z.htmlimport flash.display.MovieClip;import flash.geom.Matrix;MovieClip.prototype.rotationLee=function(tempx:Number,tempy:Number,r:Number){ varmc_lee:MovieClip=this; var Matrix_lee:Matrix =mc_l
http://blog.sina.com.cn/s/blog_50e610900100oh5z.html

import flash.display.MovieClip;
import flash.geom.Matrix;
MovieClip.prototype.rotationLee=function(tempx:Number,tempy:Number,r:Number){
  varmc_lee:MovieClip=this;
  var Matrix_lee:Matrix =mc_lee.transform.matrix;
  Matrix_lee.translate(-tempx,-tempy);
  Matrix_lee.rotate(r * Math.PI /180 );
  Matrix_lee.translate(tempx,tempy);
  mc_lee.transform.matrix =Matrix_lee;
 }

//调用方法 mc是影片剪辑
mc.rotationLee(139,216,-30);

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读