作者WEIREN (WEIREN)
看板Flash
标题[问题] 问一个as的问题 要怎麽更改才能让动画跑到下层去
时间Mon Dec 8 18:17:32 2008
sorry
因为之前有再版上问问题
但是我想应该很多人也不知道我问什麽
所以我把原始档 放再网路上
希望有高手能帮我解答
http://weirenc.myweb.hinet.net/blog/flash/9648.fla
希望程式随机产生的动画
能够在那个灰阶色块的下面
请问 该怎麽改呢?
谢谢~~
因为那个动画永远会产生在最上层说~
谢谢~
程式语法:
_root.x1 = 0;
_root.x2 = 600;
_root.y1 = 0;
_root.y2 = 400;
for (i = 1; i < 40; i++)
{
zpos.duplicateMovieClip("m" + i, i);
_root["m" + i]._x = Math.random() * (_root.x2 - _root.x1) + _root.x1;
_root["m" + i]._y = Math.random() * (_root.y2 - _root.y1) + _root.y1;
_root["m" + i]._rotation = Math.random() * 360;
_root["m" + i].onEnterFrame = function ()
{
if (this._currentframe == 25)
{
this._x = Math.random() * (_root.x2 - _root.x1) + _root.x1;
this._y = Math.random() * (_root.y2 - _root.y1) + _root.y1;
this._rotation = Math.random() * 360;
} // end if
};
} // end of for
_root.onEnterFrame = function ()
{
_root["m" + Math.ceil(Math.random() * 40)].play();
};
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 210.64.127.60