当前位置: 首页 > 图文教程 > Flash动画 > Flash动画制作 > FLASH打造彩色POPO

Flash动画制作
Flash的事件机制:从AsBroadcaster到EventDispatcher
Flash脚本的执行顺序
完全掌握AS中点(.)语法的应用
抗日Flash集之:万里长城永不倒
抗日Flash集之:地道战
抗日Flash集之:抗日新闻
抗日Flash集之:三一八惨案
抗日Flash集之:五四运动
抗日Flash集之:抗日一隅
抗日Flash集之:血染的风采
抗日Flash集之:淞沪抗战
抗日Flash集之:终日到底
抗日Flash集之:东京功略战[游戏]
抗日Flash集之:大中华·1937
抗日Flash集之:长征
抗日Flash集之:抗日宣言
抗日Flash集之:血战钓鱼岛
用Flash MX制作MOV短片
用flash打开本地文件夹
Flash打造迷你特色音乐播放器

Flash动画制作 中的 FLASH打造彩色POPO


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-22   浏览: 182 ::
收藏到网摘: n/a

原文件:
//写在帧的代码:这里的代码主要是复制用的!
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;
}