资源描述:
《用纯flash actionscript做的火柴棍小人跑的动画》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、用纯FlashActionscript做的火柴棍小人跑的动画非常有趣,本教程描绘的是完全用ActionScript做的一个火柴棍小人跑步的动画,你相信吗?完全是AS实现的。先看效果吧做的方法非常简单,直接把下面代码复制到第一帧,最好把帧频调到18fps。以下为引用的内容:fsmand("alloand("shoenu",false);lineStyle(1,0x000000,100);moveTo(0,135);lineTo(550,135);moveTo(0,185);lineTo(550,185);lineStyle(2,0x00
2、0000,100);moveTo(26,16);lineTo(37,16);lineTo(37,39);curveTo(28,43,33,67);moveTo(37,16);lineTo(26,24);moveTo(37,24);lineTo(26,31);moveTo(37,32);lineTo(26,40);moveTo(41,15);lineTo(53,14);lineTo(53,39);curveTo(39,45,50,66);moveTo(53,14);lineTo(42,21);moveTo(53,23);lineTo(4
3、2,28);moveTo(53,31);lineTo(42,38);moveTo(27,75);lineTo(27,90);lineTo(39,92);moveTo(33,74);lineTo(33,91);moveTo(38,74);lineTo(38,83);lineTo(33,84);moveTo(33,95);curveTo(41,113,48,94);moveTo(41,94);lineTo(41,127);moveTo(30,124);curveTo(38,84,51,125);moveTo(55,75);curveTo(
4、36,69,46,92);moveTo(49,75);curveTo(48,86,55,92);e){this.createEmptyMovieClip("tree"+tree_NO,tree_NO);//trace("tree_name="+"tree"+tree_NO);tellTarget("tree"+tree_NO){lineStyle(1,0x000000,100);moveTo(0,-54);curveTo(-21,-42,-23,-20);curveTo(-18,17,-5,24);lineStyle(1,0x0000
5、00,100);moveTo(0,-54);curveTo(22,-42,23,-20);curveTo(18,17,5,24);lineStyle(0.25,0x000000,100);moveTo(-5,24);lineTo(-5,-7);curveTo(1,5,5,-8);lineTo(5,24);lineStyle(1,0x000000,100);moveTo(-5,24);lineTo(-5,55);lineTo(5,55);lineTo(5,24);//------------this["tree"+tree_NO]._x
6、scale=speed_time;this["tree"+tree_NO]._yscale=speed_time;this["tree"+tree_NO]._alpha=speed_time-20;this["tree"+tree_NO]._y=75;this["tree"+tree_NO].onEnterFrame=function(){this._x=this._x+speed_time/15;if(this._x>=500){this.clear();this.onEnterFrame=undefined;this.remove
7、MovieClip();}};}};ptyMovieClip("play_caput",2000);tellTarget(this[path]["play_caput"]){lineStyle(0.25,0x000000,100);beginFill(0x000000,100);moveTo(0,-10);curveTo(-10,-8,-10,0);curveTo(-8,10,0,10);curveTo(10,8,10,0);curveTo(8,-10,0,-10);}};ptyMovieClip("play1_run",1000);
8、e=0;this.play1_run.onEnterFrame=function(){this.play_time++;tellTarget(this){if(play_time==1){clear();play_cap