动画教程     AS应用
铅笔动画
  [ 动画教程 ] -- AS应用            时间:2007-8-27


直接复制代码,导出就可以看到效果了:
_root.createEmptyMovieClip("pen", 1);
pen.lineStyle(2, 0x000000);
pen._x = 200;
pen._y = 200;
pen.beginFill(0x444444, 100);
pen.lineTo(30, -10);
pen.lineTo(200, -10);
pen.lineTo(200, 10);
pen.lineTo(30, 10);
pen.lineTo(30, -10);
pen.beginFill(0x333311, 100);
endFill(pen);
pen.beginFill(0xf9f999, 100);
pen.lineTo(0, 0);
pen.lineTo(30, 10);
pen.lineTo(30, -10);
endFill(pen);
pen._rotation = -50;
n = 0;
r = 100;
a = 1;
k = 10;
tt = 0;
lineStyle(2);
moveTo(Math.cos(0*Math.PI/180)*r+200, pen._y);
ss = setInterval(function () {
a++;
if (a>3) {
  a = 1;
}
if (a == 1) {
  lineStyle(2, 0xff0000);
}
if (a == 2) {
  lineStyle(2, 0x00ff00);
}
if (a == 3) {
  lineStyle(2, 0x0000ff);
}
n += 30
r -=0.3
if (n<20000) {
  pen._x = Math.cos(n*Math.PI/180)*r+200;
  pen._y = Math.sin(n*Math.PI/180)*r+200;
  lineTo(pen._x, pen._y);
}
updateAfterEvent();
if (n>=20000) {
  aa = setInterval(function () {
   updateAfterEvent();
   tt++;
   if (tt>5000) {
    clearInterval(aa);
    clearInterval(ss);
   }
   pen._rotation = Math.sin(n*Math.PI/180)*5+90;
  }, 5);
  _root.createTextField("t", 2, 300, 350, 150, 20);
  t.text = "By FLASH8菜鸟 kingofkofs";
  pen._x = 400;
  pen._y = 120;
}
}, 5);
sp = 0;
f = 20;
this.onEnterFrame = function() {
if (tt>5000) {
  pen._y -= sp;
  sp += 2;
}
if (sp>f) {
  sp = -f;
  if (f>=4) {
   f -= 4;
  }
}
};
快速导航:
 + 动画教程
 - FLASH应用
 - AS应用
 - 软件应用
 - 二维动画
 - 三维动画
 + 漫画教程
 - 手绘应用
 - 基础学习
 - 软件应用
学堂搜索:
  
最近展厅教程: