flash 呼叫 指令碼 Flash指令碼 星空效果

2021-10-24 07:09:57 字數 1413 閱讀 6461

flash 呼叫 指令碼

creating a starfield effect is easy! to begin, download the sample files here.

1.create a small star shape, and convert it to a movie clip. give it an instance name of star.

1.建立乙個小的星形,然後將其轉換為影片剪輯。 給它指定乙個star的例項名稱。

2.extend the existing layer by three frames. then, create a new layer above the existing layer, and create three blank frames in this layer.

2.將現有層擴充套件三個框架。 然後,在現有層之上建立乙個新層,並在該層中建立三個空白框架。

3.in the first layer, insert the actions:

3.在第一層中,插入操作:

numstars = 100;

speed = 5;

star_field = new array (numstars);

//x is x axis, y is y axis, speed is speed of star

function star(x,y,z)

for (i=0;i4.in the second key frame, insert this action:

4.在第二個關鍵幀中,插入以下操作:

for (i=0;i300)

setproperty ("star_" add i , _x , star_field[i].x )

setproperty ("star_" add i , _y , star_field[i].y )

setproperty ("star_" add i , _alpha , star_field[i].speed*40 )

}

5.finally, in the third, insert:

5.最後,在第三行中插入:

gotoandplay (2);
that』s it! test the movie!

而已! 測試電影!

翻譯自:

flash 呼叫 指令碼

flash 呼叫 指令碼 Flash指令碼 瀑布效果

flash 呼叫 指令碼 download the sample files here.1.import an image of a wate ll into flash.1.將瀑布圖匯入flash。2.set this picture as your background,name it,and ...

flash 呼叫 指令碼 Flash指令碼 彈簧效果

flash 呼叫 指令碼 download the sample files here.1.create any object of your choice,and convert it to a movie clip.1.建立您選擇的任何物件,然後將其轉換為影片剪輯。2.give it an in...

Flash呼叫Lua指令碼 二

這裡有乙個具體的例子 在這一節裡面,進一步學習使用luaalchemy。和上一節一樣,首先建立乙個as3專案.public class loweveldemo1 extends sprite private function initpage void private function loadlu...