flash 调用 脚本
How can you create a great fire effect? Like this!
如何创造出出色的射击效果? 像这样!
1. First, create a radial gradient circle object as shown below.
1.首先,如下所示创建一个径向渐变圆对象。
2. Convert this to a graphic object, and name it ‘flame’.
2.将其转换为图形对象,并将其命名为“ flame”。
3. Again convert this graphic object — this time, to a movie clip. Give this movie clip a instance name of ‘fl’.
3.再次将此图形对象转换为影片剪辑。 为该影片剪辑指定实例名称“ fl”。
4. Now, go into the timeline of the movie clip fl. Shrink the size of flame graphic object as shown below.
4.现在,进入影片剪辑fl的时间线。 如下所示缩小火焰图形对象的大小。
5. Extend 4 frames and place a key frame in the fourth frame.
5.延长4帧并将关键帧放在第四帧中。
6. Now, scale the flame object as shown below. In the ‘effect’ palletes, I changed the tint color to yellow, and got this:
6.现在,按如下所示缩放火焰对象。 在“效果”托盘中,我将色调颜色更改为黄色,并得到以下信息:
7. From the fourth key frame, extend the frame by another 24 frames, and place a key frame at that point.
7.从第四个关键帧开始,将该帧再扩展24个帧,然后在该点放置一个关键帧。
8. In this frame, I moved the flame object vertically upwards by 150 pixels.
8.在此帧中,我将火焰对象垂直向上移动了150个像素。
I also scaled the flame object to a very small size, changed the tint color to red, and decreased the alpha to 23%. I also gave motion tweening to the frames.
我还将火焰对象缩放为非常小的尺寸,将色泽颜色更改为红色,并将alpha降低为23%。 我还对框架进行了补间动画。
9. Now, go back to the main timeline. Extend it by 3 frames.
9.现在,返回主时间轴。 将其延长3帧。
10. Create a new layer above the current layer, and name it actions. Create three blank key frames.
10.在当前层上方创建一个新层,并将其命名为action。 创建三个空白关键帧。
11. In the first key frame, insert the action:
11.在第一个关键帧中,插入操作:
i = 0; setProperty ("fl", _visible, 0); xx = getProperty("fl",_x); 19.In the second key frame give action: if(i < 35) { duplicateMovieClip ("/fl", "fl" add i, i); setProperty ( "fl" add i, _alpha,i*8); setProperty ( "fl" add i, _x,random(3) + xx); i = i + 1; }
i = 0; setProperty ("fl", _visible, 0); xx = getProperty("fl",_x); 19.In the second key frame give action: if(i < 35) { duplicateMovieClip ("/fl", "fl" add i, i); setProperty ( "fl" add i, _alpha,i*8); setProperty ( "fl" add i, _x,random(3) + xx); i = i + 1; }
12. In the third key frame, insert this action:
12.在第三个关键帧中,插入以下操作:
gotoAndPlay (2);
gotoAndPlay (2);
You’re done! Test the movie.
你完成了! 测试电影。
翻译自: https://www.sitepoint.com/flash-script-fire-effect/
flash 调用 脚本
相关资源:jdk-8u281-windows-x64.exe