100%
雅典娜战队——2016秋季“20天大作战”
以雅典娜战队暑期队员个人奖项为例。 一、导入需要的图片 1.打开flash8.0界面,插入——新建元件——影片剪辑,命名为“图片”。 图片:1.png ============================================================================ 2.插入空白关键帧,导入第一张图片,居中对齐,后边依次再插入7个空白关键帧,分别导入第2-8张图片,分别居中对齐。 图片:2.png ======================================================================== 3.新建一个影片剪辑,命名为“图片旋转” 图片:3.png 4.在图层一上分别插入图层二,图层三。 图片:4.png ==================================================================================== 5.图层1,从库里把影片剪辑‘图片’拖入舞台,居中对齐。 属性里给图片写实例名:ball 图片:5.png =============================================================================== 6.给属性里,给图层2写帧标签:tempStart 图片:6.png =============================================================================== 7.打开动作面板,给图层三写代码, 图片:7.png 复制下面代码到面板里: function init() { COUNT = 8; LIST = []; RADIUS = 200; STANDBY_ANG = 90; tmp_frame_count = 20; for (var _loc3 = 0; _loc3<COUNT; ++_loc3) { var _loc2 = ball.duplicateMovieClip(_loc3.toString(), _loc3); LIST.push(_loc2); _loc2.gotoAndStop(_loc3+1); _loc2.r = 6.280000E+000/COUNT*_loc3; _loc2.btns._visible = false; _loc2.btns.btn1280.onRelease = com.hbbalfred.as2.utils.Delegate.create(this, download, 1280, _loc2); _loc2.btns.btn1024.onRelease = com.hbbalfred.as2.utils.Delegate.create(this, download, 1024, _loc2); _loc2.bb.onRelease = com.hbbalfred.as2.utils.Delegate.create(this, release, _loc2); _loc2.move = b_move; _loc2.render = b_render; _loc2.move(0); var _loc6 = _loc2.x; var _loc5 = _loc2.y; var _loc4 = _loc2.scale; _loc2.x = _loc2._x; _loc2.y = _loc2._y; _loc2.scale = 50; new mx.transitions.Tween(_loc2, "x", mx.transitions.easing.Regular.easeOut, _loc2.x, _loc6, tmp_frame_count, false); new mx.transitions.Tween(_loc2, "y", mx.transitions.easing.Regular.easeOut, _loc2.y, _loc5, tmp_frame_count, false); new mx.transitions.Tween(_loc2, "scale", mx.transitions.easing.Regular.easeOut, _loc2.scale, _loc4, tmp_frame_count, false); } // end of for ball._visible = false; standby = null; } // End of the function function removeAllDownloads() { while (LIST.length) { LIST.pop().removeMovieClip(); } // end while } // End of the function function release(ball) { if (standby != ball) { standby.btns._visible = false; standby = ball; } // end if } // End of the function function download(w, ball) { var _loc1 = "dl/"; switch (w) { case 1280 : _loc1 = _loc1+("00"+ball._currentframe+"_1280x1024.jpg"); break; case 1024 : _loc1 = _loc1+("00"+ball._currentframe+"_1024x768.jpg"); break; default : trace("unknown: "+w); } // End of switch } // End of the function function isStandBy(r) { var _loc1 = com.robertpenner.utils.MathUtil.fixAngle(com.robertpenner.utils.MathUtil.radiansToDegrees(r)); return (Math.abs(STANDBY_ANG-_loc1)<5); } // End of the function function onEnterFrame() { if (--tmp_frame_count>0) { for (var _loc1 = 0; _loc1<LIST.length; ++_loc1) { LIST[_loc1].render(); } // end of for } else { delete tmp_frame_count; onEnterFrame = execute; } // end else if } // End of the function function execute() { if (standby == undefined) { speed = (_root._xmouse-_x)*2.000000E-004; if (speed>5.000000E-002) { speed = 5.000000E-002; } // end if } else { speed = 1.000000E-001; } // end else if if (standby) { if (standby.btns._visible=isStandBy(standby.r)) { return; } // end if } // end if for (var _loc2 = 0; _loc2<LIST.length; ++_loc2) { var _loc3 = LIST[_loc2]; _loc3.move(speed); _loc3.render(); } // end of for } // End of the function function b_move(speed) { this.x = Math.cos(this.r)*RADIUS; this.y = Math.sin(this.r)*RADIUS*2.000000E-001+80; this.scale = Math.sin(this.r)*RADIUS*2.000000E-001+60; this.r = this.r+speed; } // End of the function function b_render() { this._x = this.x; this._y = this.y; this._xscale = this._yscale=this.scale<0 ? (0) : (this.scale); this.swapDepths(this.scale); } // End of the function function watchTV() { if (_root.is_login) { gotoAndStop("tempVideo"); } else { gotoAndStop("tempLogin"); } // end else if } // End of the function stop(); if (_root.playm == 2) { gotoAndStop("tempReg"); _root.playm = 3; } // end if init(); 二、返回场景1,把‘图片旋转’那个影片剪辑从库里拖入舞台,放到合适的位置。OK,测试保存。就这么简单,你也试试吧~ 效果: 军令状楼层会随时给录入战队帖沙发楼层,方便去主贴报名查询军令状楼。 战队地址:http://bbs.jd100.com/read.php?tid=761353&fid=409,快戳~ |
|
100% |
沙发#
发布于:2016-09-17 15:36
|
|
板凳#
发布于:2016-09-17 15:50
6666666666666666666
|
|
|
地板#
发布于:2016-09-17 15:52
|
|
4楼#
发布于:2016-09-17 15:52
|
|
|
5楼#
发布于:2016-09-17 15:53
|
|
6楼#
发布于:2016-09-17 15:55
|
|
|
7楼#
发布于:2016-09-17 19:55
后面的没看懂
|
|
8楼#
发布于:2016-09-18 21:53
|
|
9楼#
发布于:2016-09-30 18:39
这代码好长~我们只学到PowerPoint
|
|
|
上一页
下一页