STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229428
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2574 · P5147

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/64814175?noj=FRM64814175-1DC" width="1" height="1"></div>

Flash particles tutorial.swf

This is the info page for
Flash #69518

(Click the ID number above for more basic data on this flash file.)


Text
LOADING

LOADING

Sample

Hello And Welcome to my second tutorial
for you guys, the aspiring flash artists.
In this edition we take a look at how to make
a candle flame using the duplicate movie
method. Basically this is kind of like making
a particle system in flash. For example a movie
clip keeps generating a copy of itself over
and over again giving the illusion of a
constant flow. This tutorial will only show
you the basics , but this can be used in
many situations such as for rain
smoke or starbursts. Keep in mind though
that this technique can be very processor
intensive for some computers and can slow
your animation if you are not careful.
So without further delay, here is the tutorial :).

PS there will be a gallery @ the end
showcasing different usages.

Step 1: Change your Frame Rate
to 30. You can change
this later if desired, but remember
you'll have to go back and
adjust the amount of frames
in your movie clips.

Step 2: Draw an orb with a radial gradient fill(no stroke).
Make the center white. The middle orange, and
the outside should be a vibrant red with
it's alpha channel turned down to 0 like
shown below in figure c

Step 3: Group your orb together using ctrl+g. Then we
are going to convert it(f8 key) to a graphic with the name
"fireorb". Hit ok and continue.

Step 4: Once it is converted, we will have to convert
it again into another type of symbol(a movie clip)
so hit F8 again and this time choose movie clip
instead of graphic. Give it a name of "firego".
Hit OK once it is converted double click the orb
while it is on the stage and it will let you "edit in place"
You can also get to edit in place by right-clicking
the orb end choosing the appropriate menu item.

Before

After

Step 5: Once you're inside of the new movie clip insert a keyframe
on frame 20 by right-clicking in frame 20 and choosing "insert keyframe"
then while still on frame 20 select the orb and move it straight up
by about 170 pixels or so.If you hold shift when you move the
orb it will constrain your movement to a straight line.

Step 6: Right-click anywhere between the 2 keyframes
in the timeline and choose "Create Motion Tween".
this will "tween" your object and make it move.

Step 7: Select the orb again and in the properties inspector
at the bottom of the screen change the "color" box to say "alpha"
Once this is done use the slider next to the box to lower the
orb's alpha to 0. This makes the orb fade away.

Step 8: Right-click on frame 21 in the timeline
and choose "insert blank keyframe".
then hit F9 to bring up the actions panel.
When in the panel  copy and paste this
action script in the window.

<P ALIGN="CENTER"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">stop();</FONT></P>

This will stop the movie clip from playing
over and over.

Step 9: Next we are going to go back to the main
timeline by hitting the scene1 button.

Step 10: The next step is to convert the orb to
another symbol once again.Hit F8 to convert to
symbol choose Movie Clip as the behavior.
And for the name type "duplicator". Once converted we are
going to edit this one in place as well.
Double click the orb to go "into" it.

Step 11: Once inside of the clip select the firego movie clip
that is inside already. When it is selected you will see
in the property inspector at the bottom of the screen
that there is a box there that says "instance name"
click inside this box to activate it and type orb
for the name.

Step 12: Now add a layer to the timeline by hitting the
folder icon with a + on it.Name the new layer actions
and name the first layer "orb". Once named right click
on frame 2 of each layer and hit "insert keyframe".

Step 13: Now we are going to add the actions for
the actions layer. Select frame 1 and hit F9. Inside
of the actions window that pops up type paste this
action script.Make sure you copy/paste.
the entire following text marked in blue.
The // lines that you see can be removed without
affecting your script.

<P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// the following line will duplicate the movie</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// over and over again and add a new instance</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// name each time it makes a new one.</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">duplicateMovieClip(orb, c, c);</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">//the fi\ollowing line sets the rotation</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// of the orb to be slightly different</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// in each frame, giving it a flickering</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// look</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">setProperty(orb, _rotation, random(6));</FONT></P>

Step 14: Select frame 2 in the actions layer and
bring up the actions window again(F9). then paste this
script in the window. Remember Paste ALL BLUE TEXT
and again you may delete any lines marked with //.

<P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// the following line initializes a variable</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// named &quot;c&quot; This line is also where the new</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// instance name and level of the newly formed</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// duplicated movie clips are named. Another</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// function of this line is to add itself</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// plus one each time this frame plays thus</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// making it one number higher than the last</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">c=c+1;</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// the following line states that if the </FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// variable c from above should exceed the</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// number 20 to reset it back to 0.</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">if (c&gt;20) {</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">c=0;</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">}</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// the following line tells the playback </FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">// head of the movie to go to frmae 1</FONT></P><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="15" COLOR="#0000FF">gotoAndPlay(1);</FONT></P>

Step 15: Change your background color to black.
this way you'll see your flame better.
Hit Ctrl+Enter to watch your new flames.:)
Click next to see more examples of this in use.

Click here for rain source file

Click here for rain source file

ActionScript [AS1/AS2]

Frame 1
if (_root.getBytesLoaded() == _root.getBytesTotal()) { _root.gotoAndStop("begin"); } percent = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
Frame 2
gotoAndPlay (1);
Frame 3
stop();
Frame 21
stopAllSounds();
Symbol 11 MovieClip Frame 21
stop();
Symbol 12 MovieClip Frame 1
duplicateMovieClip (orb, c, c); setProperty(orb, _rotation , random(6));
Symbol 12 MovieClip Frame 2
c = c + 1; if (c > 20) { c = 0; } gotoAndPlay (1);
Symbol 19 Button
on (release) { _parent.gotoAndStop(_parent._currentframe + 1); }
Symbol 20 Button
on (release) { _parent.gotoAndStop(_parent._currentframe - 1); }
Symbol 79 MovieClip Frame 31
stop();
Symbol 80 MovieClip Frame 1
duplicateMovieClip (orb, c, c); setProperty(orb, _rotation , random(360));
Symbol 80 MovieClip Frame 2
c = c + 1; if (c > 30) { c = 0; } gotoAndPlay (1);
Symbol 82 MovieClip Frame 41
stop();
Symbol 83 MovieClip Frame 1
duplicateMovieClip (orb, c, c); setProperty(orb, _rotation , random(360)); setProperty(orb, _xscale , random(100)); setProperty(orb, _yscale , random(100));
Symbol 83 MovieClip Frame 2
c = c + 1; if (c > 20) { c = 0; } gotoAndPlay (1);
Symbol 87 MovieClip Frame 46
stop();
Symbol 88 MovieClip Frame 1
c = 0;
Symbol 88 MovieClip Frame 2
duplicateMovieClip (drop, c, c); setProperty(c, _y , random(20)); setProperty(c, _x , random(550));
Symbol 88 MovieClip Frame 3
c = c + 1; if (c > 40) { c = 0; } gotoAndPlay (2);
Symbol 92 Button
on (release) { getURL ("http://www.wrathmedia.com/rain/rain.fla", "_self"); }

Library Items

Symbol 1 FontUsed by:2 3 4 5 7 8 9 24 30 33 36 40 41 42 45 48 51 52 53 56 59 62 65 68 69 72 73 76 90 91
Symbol 2 EditableTextUses:1Used by:Timeline
Symbol 3 EditableTextUses:1Used by:Timeline
Symbol 4 EditableTextUses:1Used by:Timeline
Symbol 5 EditableTextUses:1Used by:Timeline
Symbol 6 GraphicUsed by:Timeline
Symbol 7 EditableTextUses:1Used by:Timeline
Symbol 8 EditableTextUses:1Used by:Timeline
Symbol 9 EditableTextUses:1Used by:Timeline
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClipUses:10Used by:12
Symbol 12 MovieClipUses:11Used by:Timeline
Symbol 13 GraphicUsed by:21
Symbol 14 GraphicUsed by:19 20
Symbol 15 GraphicUsed by:19 20
Symbol 16 GraphicUsed by:19 20
Symbol 17 GraphicUsed by:19 20
Symbol 18 GraphicUsed by:19 20
Symbol 19 ButtonUses:14 15 16 17 18Used by:21
Symbol 20 ButtonUses:14 15 16 17 18Used by:21
Symbol 21 MovieClipUses:13 19 20Used by:Timeline
Symbol 22 BitmapUsed by:23
Symbol 23 GraphicUses:22Used by:Timeline
Symbol 24 EditableTextUses:1Used by:Timeline
Symbol 25 BitmapUsed by:29
Symbol 26 BitmapUsed by:29
Symbol 27 BitmapUsed by:29
Symbol 28 BitmapUsed by:29
Symbol 29 GraphicUses:25 26 27 28Used by:Timeline
Symbol 30 EditableTextUses:1Used by:Timeline
Symbol 31 BitmapUsed by:32
Symbol 32 GraphicUses:31Used by:Timeline
Symbol 33 EditableTextUses:1Used by:Timeline
Symbol 34 BitmapUsed by:35
Symbol 35 GraphicUses:34Used by:Timeline
Symbol 36 EditableTextUses:1Used by:Timeline
Symbol 37 BitmapUsed by:39
Symbol 38 BitmapUsed by:39
Symbol 39 GraphicUses:37 38Used by:Timeline
Symbol 40 EditableTextUses:1Used by:Timeline
Symbol 41 EditableTextUses:1Used by:Timeline
Symbol 42 EditableTextUses:1Used by:Timeline
Symbol 43 BitmapUsed by:44
Symbol 44 GraphicUses:43Used by:Timeline
Symbol 45 EditableTextUses:1Used by:Timeline
Symbol 46 BitmapUsed by:47
Symbol 47 GraphicUses:46Used by:Timeline
Symbol 48 EditableTextUses:1Used by:Timeline
Symbol 49 BitmapUsed by:50
Symbol 50 GraphicUses:49Used by:Timeline
Symbol 51 EditableTextUses:1Used by:Timeline
Symbol 52 EditableTextUses:1Used by:Timeline
Symbol 53 EditableTextUses:1Used by:Timeline
Symbol 54 BitmapUsed by:55
Symbol 55 GraphicUses:54Used by:Timeline
Symbol 56 EditableTextUses:1Used by:Timeline
Symbol 57 BitmapUsed by:58
Symbol 58 GraphicUses:57Used by:Timeline
Symbol 59 EditableTextUses:1Used by:Timeline
Symbol 60 BitmapUsed by:61
Symbol 61 GraphicUses:60Used by:Timeline
Symbol 62 TextUses:1Used by:Timeline
Symbol 63 BitmapUsed by:64
Symbol 64 GraphicUses:63Used by:Timeline
Symbol 65 EditableTextUses:1Used by:Timeline
Symbol 66 BitmapUsed by:67
Symbol 67 GraphicUses:66Used by:Timeline
Symbol 68 EditableTextUses:1Used by:Timeline
Symbol 69 EditableTextUses:1Used by:Timeline
Symbol 70 BitmapUsed by:71
Symbol 71 GraphicUses:70Used by:Timeline
Symbol 72 EditableTextUses:1Used by:Timeline
Symbol 73 EditableTextUses:1Used by:Timeline
Symbol 74 BitmapUsed by:75
Symbol 75 GraphicUses:74Used by:Timeline
Symbol 76 EditableTextUses:1Used by:Timeline
Symbol 77 GraphicUsed by:Timeline
Symbol 78 GraphicUsed by:79
Symbol 79 MovieClipUses:78Used by:80
Symbol 80 MovieClipUses:79Used by:Timeline
Symbol 81 GraphicUsed by:82
Symbol 82 MovieClipUses:81Used by:83
Symbol 83 MovieClipUses:82Used by:Timeline
Symbol 84 GraphicUsed by:Timeline
Symbol 85 GraphicUsed by:87
Symbol 86 GraphicUsed by:87
Symbol 87 MovieClipUses:85 86Used by:88
Symbol 88 MovieClipUses:87Used by:Timeline
Symbol 89 GraphicUsed by:92
Symbol 90 EditableTextUses:1Used by:92
Symbol 91 EditableTextUses:1Used by:92
Symbol 92 ButtonUses:89 90 91Used by:Timeline
Symbol 93 SoundUsed by:Timeline

Instance Names

"orb"Symbol 12 MovieClip Frame 1Symbol 11 MovieClip
"orb"Symbol 80 MovieClip Frame 1Symbol 79 MovieClip
"orb"Symbol 83 MovieClip Frame 1Symbol 82 MovieClip
"drop"Symbol 88 MovieClip Frame 2Symbol 87 MovieClip

Labels

"begin"Frame 3

Dynamic Text Variables

percentSymbol 3 EditableText""
percentSymbol 5 EditableText""




http://swfchan.com/14/69518/info.shtml
Created: 10/4 -2019 09:24:47 Last modified: 10/4 -2019 09:24:47 Server time: 01/11 -2024 00:38:16