您好!欢迎您光临本站! 体育 I 论坛 I 交友 I

会员注册

I

本站搜索

I

收藏本站

当前位置:首页 >>>学习教程>>>心情小屋原创教程>>>方块运动遮罩视频教程
方块运动遮罩视频教程
发表日期:2010/3/24 1:20:00 出处:心情小屋 作者:Vicky 发布人:vickyguan888 已被访问 4135

先点击看效果

 
 

代码

znum = 0;
allz = new Array();
allz[0] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
allz[1] = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
allz[2] = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17];
allz[3] = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18];
allz[4] = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19];
allz[5] = [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
allz[6] = [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21];
allz[7] = [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22];
allz[8] = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
allz[9] = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24];
allz[10] = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25];
allz[11] = [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26];
allz[12] = [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27];
allz[13] = [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28];
allz[14] = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29];
for (i = 0; i < 25; i++)
{
    for (j = 0; j < 25; j++)
    {
        mov.nemo.duplicateMovieClip("m" + (i - 1) * 15 + j, (i - 1) * 15 + j);
        mov["m" + (i - 1) * 15 + j].xnum = i;
        mov["m" + (i - 1) * 15 + j].ynum = j;
        mov["m" + (i - 1) * 15 + j]._x = i * 40 + 40;
        mov["m" + (i - 1) * 15 + j]._y = j * 40 + 40;
        mov["m" + (i - 1) * 15 + j].onEnterFrame = function ()
        {
            if (allz[this.ynum][this.xnum] == znum)
            {
                this.play();
            } // end if
        };
    } // end of for
} // end of for
onEnterFrame = function ()
{
    if (znum < 50)
    {
        ++znum;
    } // end if
};
 

把此效果放进歌曲里,点击欣赏:

我是你的小小狗

上一篇:心情小屋原创Flash教程总汇

下一篇:代码做旋转图片视频教程


欢迎光临心情小屋!

http://vickyguan888.16789.net

双击自动滚屏 【打印本页】 【关闭窗口
 相关评论:



vickyguan888
(2008/9/21 23:17:00)

是最后几行代码没分别粘贴


1977
(2008/9/21 17:01:00) [60.16.116.]

我做的和“你好”一样 就是不行啊。


柳暗花明
(2008/8/8 1:09:00) [58.253.115.]

支持下,刚学的,还没看懂


你好
(2008/7/30 15:51:00) [119.36.144.]

已修改好,做成了。谢谢!是最后几行代码没分别粘贴。


你好
(2008/7/30 15:44:00) [119.36.144.]

贴上代码。测试时出现两个错误。
**错误** 符号=元件 3, 图层=图层 2, 帧=1:第 35 行: 语句块必须以 '}' 结束
     onEnterFrame = function () { if (znum<50) {++znum;}// end if};

**错误** 符号=元件 3, 图层=图层 2, 帧=1:第 36 行: 语法错误。

ActionScript 错误总数:2   报错:2

 发表评论:共有 9 条评论

身份选择:会员 游客(游客不需要输入密码)
用 户 名: 密 码:
评论内容:
(最多评论字数:500)

心情小屋 | 设为首页 | 加入收藏 | 联系我们 | 进入管理 | 关于站长 | 本站搜索

联系电话:QQ 422175408 联系人:Vicky