打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
弹射相册教程
效果图:
文本教程:(教程来自--自由风老师实用教程)
1、新建as2.0文档。
2、导入若干张(比方15张)图片到库,分别转化为mc(注册点正中,宽高适宜,加上相框),标识符分别为tu1、tu2、tu3、……、tu15。
3、回到库,图层1(背景),略。
图层2(as),第1帧输入语句:
i = 0;
n = 15;    //图片张数
t = 35;    //间隔长短
for (j=1; j<=n; j++) {
attachMovie("tu"+j, "tu"+j, n-j+1);
this["tu"+j].xx = this["tu"+j]._x=random(Stage.width-200)+100;
this["tu"+j].yy = this["tu"+j]._y=Stage.height+160;
this["tu"+j].rot = this["tu"+j]._rotation=random(360);
this["tu"+j].onPress = function() {
_root.onEnterFrame = null;
mx.behaviors.DepthControl.bringToFront(this);
this.onEnterFrame = function() {
this._x += (Stage.width/2-this._x)/5;
this._y += (Stage.height/2-this._y)/5;
this._xscale = this._yscale += (180-this._xscale)/5;
this._rotation += (0-this._rotation)/5;
};
};
this["tu"+j].onRelease = this["tu"+j].onReleaseOutside=function () {
bb();
this.x = random(Stage.width-200)+100;
this.y = random(Stage.height-200)+100;
this.rot = random(100)-50;
this.onEnterFrame = function() {
this._x += (this.x-this._x)/5;
this._y += (this.y-this._y)/5;
this._xscale = this._yscale += (100-this._xscale)/5;
this._rotation += (this.rot-this._rotation)/5;
if (Math.abs(100-this._xscale)<=0.5) {
this.onEnterFrame = null;
}
};
};
}
function aa(tu, a) {
if (i>a && i<=a+t) {
if (i == a+1) {
tu._x = tu.xx;
tu._y = tu.yy;
tu._rotation = random(360);
} else if (i == a+2) {
mx.behaviors.DepthControl.bringToFront(tu);
tu.x = random(Stage.width-200)+100;
tu.y = random(Stage.height-200)+100;
tu.rot = random(100)-50;
}
tu._x += (tu.x-tu._x)/5;
tu._y += (tu.y-tu._y)/5;
tu._rotation += (tu.rot-tu._rotation)/5;
}
}
function bb() {
this.onEnterFrame = function() {
i<t*n ? i++ : i=1;
for (j=1; j<=n; j++) {
aa(this["tu"+j], (j-1)*t);
}
};
}
bb();
测试,OK!
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
利用Flash AS制作图片转场效果
制作FLASH教程之AS多图切换(图文效果)教程编写
【动画教程】彩蝶飞舞
绚酷鼠标 [目标移动]
Flash8 字体特效
影片剪辑的Action编写规则-设计部落-搜狐博客
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服