CGArt-中国CGer中的绿色家园
首页 信息动态 原创排行 互动教程 资源千寻 CG人才 CGArt杂志 艺术设计 CG画廊 CG论坛 酷站欣赏 CG搜索 会员中心
FLASH打造彩色POPO
来源:中国教程网论坛 作者:呱唧 编辑:浪漫的季节 发布时间:2007年04月03日 16:13:29

原文件:
//写在帧的代码:这里的代码主要是复制用的!
i = 0;
ppo._visible=false
function enet() {
        i++;
        sc = random(50)+20;
        duplicateMovieClip("ppo", "ppo"+i, i);
        _root["ppo"+i]._x = random(550);
        _root["ppo"+i]._y = random(400);
        _root["ppo"+i]._xscale = _root["ppo"+i]._yscale=sc;
}
onEnterFrame = function () {
        if (i<25) {
                enet();
        }
};
_____________________________________________________________________________________

//写在元件本身的代码
onClipEvent (load) {
        xx = random(550);
        xy = random(400);
        dt = 50;
        this.ys._alpha=random(150)+50;
        var yanse:Color = new Color(this.yanse_mc);
        yanse.setRGB(random(0xffffff));
}
onClipEvent (enterFrame) {
        if (random(dt) == 1) {
                xx = random(550);
                xy = random(400);
        }
        //   
        dx = (xx-_x);
        dy = (xy-_y);
        dx*=.01;
        dy*=.01;
        //dx*=.4;
        //dy*=.4
        _x += dx;
        _y += dy;
        _rotation+=0;
}



共有评论0条
更多评论..
作者信息 详细信息
评论人:
验证码:
内容:
 
about us advertisement publish conformity service cooperate associate link site map contact us help jump to the top of page