Re: [問題] 問一個as的問題 要怎麼更改才能讓動畫똠…
先把灰色塊設成movieclip,再給定instance name(比方mc)
zpos.duplicateMovieClip("m" + i, i);這行後面再加一行
mc.swapDepths(_root.getNextHighestDepth()+1);
※ 引述《WEIREN (WEIREN)》之銘言:
: 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: 123.204.108.27
Flash 近期熱門文章
PTT數位生活區 即時熱門文章