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

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

Preloader Tutorial.swf

This is the info page for
Flash #54661

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


Text
321

Flash

PLAY

MUSIC

MUSIC

BACK

BACK

FORWARD

FORWARD

sound

Click to play. Mouse over to stop.
-SOUND MENU-

Haunted Woods

ParagonX9

Life on Mars?

Edward Coles (Hoeloe)

Beware; The Muffin

Shane Jensen (MusicIsBliss)

02

321 a Vision

Why another Preloader tut?

While there are many on NG, the ones most easily
accessible are a bit too confusing for the average NGer, and
I have been seeing too many submits without a working
preloader. Also I love making tuts that help the NG
community, and I'm a horrid animator.
First I will show you where to find the NG preloaders, next
I will show you how to put one in, and finally (if you are
adventurous) I will show you how to make your own, and
explain the AS.
Let's get started...

03

Where do they hide??

Newgrounds has many pre-made, ready to use preloaders.
You can click this button              to be taken to where there
are or you can copy and then paste the URL below into
your browser's address area.
Download them all, or just the one that seems coolest to
you. Once you have the one you'd like to use downloaded
and opened in flash, click next and we'll begin.

Preloaders

http://www.newgrounds.com/downloads/preloaders/

04

You got to put em' in silly...

The easiest may to use a NG preloader is to just delete
everything except the first frame, and start making your
flash from the second frame on. NG preloaders are set to go
to the second frame after the movie/game loads, whether
they are the auto-play type or the start button type.
Let's say for some reason, you'd rather not do it that way.
You can copy the first frame (of the preloader file) then
paste it into the first frame of another file.
You now know how to put a NG preloader in your flash
work. Impress your friends with your new found
knowledge.

05

DEMO

This is what a NG preloader should look like when you open it.

Highlight all but the first frame...

Remove them.... Frames that is...

DONE

Now insert a blank key frame in the second frame and start
making your movie/game...

You can make your own.

Do not be intimidated, you CAN make your own preloader.
The way I'll be showing you is how I do it.. There are
always other ways, I am not saying mine is best, only that it
works for me.
First open flash, lol... In the first frame, take your brush and
make a dot in the middle of the stage. Convert the dot to a
MC (movie clip), name it "preloader". Double click the
MC, this will take you inside of the MC. Click, then right
click the dot and cut it. Why cut it? You don't need the dot..

06

The power is yours!

Now we come to the fun part, I'll be explaining the AS and
the loading bar part.. The background and text parts I hope
you can figure out on your own.
Create 3 layers, one will be for the bar, one for the mask,
and one for the AS. (I'm hoping you have a basic
understanding of how masking works.) Name layer one
"bar", name layer two "mask" (and make it a mask layer),
and name layer 3 "AS". In the bar layer, using the rectangle
tool make a rectangle like this...

07

It gets even better...

Lock the bar layer, in the mask layer make another
rectangle (the same size), and place it directly over the bar.
Convert the mask bar to a MC, call it "maskbar", give it the
instance name of "bar". In the second frame, insert one
frame in both the bar and mask bar layers. Now the AS....
Put this in the first AS key frame.

08

_root.stop();
PercentLoaded = _root.getBytesLoaded()/_root.getBytesTotal()*100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndPlay(3);
}

AS is fun.. Yes it is...

In the second frame of the AS layer insert a blank key
frame. Put this in that key frame.
Now let's take the AS apart, to try and understand it better.
_root.stop();
stops the movie from going to the next frame on the main
timeline.
PercentLoaded =
_root.getBytesLoaded()/_root.getBytesTotal()*100;
This tells flash player what PercentLoaded is.. :P

09

gotoAndPlay(1);

Cuz you just can't get enough...

if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndPlay(3);
}
This tells our mask bar to scale at the same rate as the
percentage that is loaded. Once it is at 100 %, it is told to go
to frame 3 (in the MC) and play from there.
gotoAndPlay(1); This creates a loop until the movie is
loaded, without it the MC would just keep going...

10

Wait...

It should look like this...
We are not out of the woods yet.. Once the movie is loaded
it will go to and play frame three inside of the MC.. If we
left it alone, we would have a never ending loop.. So to get
the movie to start automatically, in the third frame of the
AS layer we would put.

11

_root.play();

Almost done...

_root.play(); Makes the movie play...
But I want a button! Ok well then, in the third frame you
put a button in, change gotoAndPlay(3); (in the main
preloader AS) to gotoAndStop(3).. and you now have a
button controlled preloader... Here's the AS you put in the
button.

12

on (release) {
_root.play();
}

TEST IT!!!

Before you upload a flash with your new preloader to
newgrounds.. Test it! You need to upload the flash to test
the preloader, you can not just test the file on your
computer, because flash player doesn't need to load it, since
it is on your hard drive.. If it is smaller then 5 MB you can
upload it to spamtheweb.com.
Odds and ends... If you want your bar to scale in the
opposite direction, just flip the mask bar around with the
free transform tool. Want it to go up or down? Just change
_xscale to _yscale.. Mess around with it... Thanks.

13

Credits

Music:
Beware; The Muffin
Author: Shane Jensen (MusicIsBliss)
Life on Mars?
Author: Edward Coles (Hoeloe)
Haunted Woods
Author: ParagonX9
I hope this helped you.

Cr

ActionScript [AS1/AS2]

Frame 2
var snd1 = new Sound(); snd1.attachSound("song1"); var snd2 = new Sound(); snd2.attachSound("song2"); var snd3 = new Sound(); snd3.attachSound("song3"); stop();
Symbol 16 Button
on (release) { getURL ("http://www.newgrounds.com/portal/", "_blank"); }
Symbol 25 Button
on (release) { _root.play(); }
Symbol 26 MovieClip Frame 1
_root.stop(); PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100; if (PercentLoaded != 100) { bitch._xscale = PercentLoaded; } else { gotoAndPlay (3); }
Symbol 26 MovieClip Frame 2
gotoAndPlay (1);
Symbol 26 MovieClip Frame 20
stop();
Symbol 34 MovieClip Frame 1
stop();
Symbol 50 Button
on (release) { gotoAndPlay (2); }
Symbol 58 Button
on (rollOver) { _root.snd2.stop(); _root.snd1.stop(); } on (release) { _root.snd3.start(0, 1000); }
Symbol 62 Button
on (rollOver) { _root.snd1.stop(); _root.snd3.stop(); } on (release) { _root.snd2.start(0, 1000); }
Symbol 66 Button
on (rollOver) { _root.snd2.stop(); _root.snd3.stop(); } on (release) { _root.snd1.start(0, 1000); }
Symbol 68 Button
on (release) { gotoAndPlay (26); }
Symbol 69 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 25
stop();
Symbol 76 Button
on (release) { nextFrame(); }
Symbol 87 Button
on (release) { prevFrame(); }
Symbol 94 Button
on (release) { getURL ("http://www.newgrounds.com/downloads/preloaders/", "_blank"); }
Symbol 102 Button
on (release) { gotoAndPlay (2); }
Symbol 117 Button
on (release) { gotoAndStop (1); }
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 20
stop();

Library Items

Symbol 1 GraphicUsed by:26
Symbol 2 ShapeTweeningUsed by:5
Symbol 3 ShapeTweeningUsed by:5
Symbol 4 GraphicUsed by:5
Symbol 5 MovieClipUses:2 3 4Used by:6
Symbol 6 MovieClipUses:5Used by:26
Symbol 7 FontUsed by:8 9
Symbol 8 TextUses:7Used by:26
Symbol 9 TextUses:7Used by:26
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClipUses:10Used by:18 26
Symbol 12 GraphicUsed by:26
Symbol 13 GraphicUsed by:26
Symbol 14 GraphicUsed by:15 16
Symbol 15 MovieClipUses:14Used by:16
Symbol 16 ButtonUses:15 14Used by:26
Symbol 17 GraphicUsed by:18
Symbol 18 MovieClipUses:17 11Used by:26
Symbol 19 GraphicUsed by:24 25
Symbol 20 FontUsed by:21 38 39 41 42 44 49 54 55 56 59 60 63 64 80 84 85 88 89 90 92 95 96 97 98 99 101 106 109 112 116 118 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 142 143 144 145 146 147 148 149 150 151 152
Symbol 21 TextUses:20Used by:24 25
Symbol 22 GraphicUsed by:23 24 25
Symbol 23 MovieClipUses:22Used by:24 25
Symbol 24 ButtonUses:19 21 23 22Used by:26
Symbol 25 ButtonUses:19 21 23 22Used by:26
Symbol 26 MovieClipUses:1 6 8 9 11 12 13 16 18 24 25Used by:Timeline
Symbol 27 BitmapUsed by:28
Symbol 28 GraphicUses:27Used by:29
Symbol 29 MovieClipUses:28Used by:Timeline
Symbol 30 GraphicUsed by:34
Symbol 31 Sound [song1]Used by:34
Symbol 32 Sound [song2]Used by:34
Symbol 33 Sound [song3]Used by:34
Symbol 34 MovieClipUses:30 31 32 33Used by:Timeline
Symbol 35 BitmapUsed by:37
Symbol 36 BitmapUsed by:37
Symbol 37 GraphicUses:35 36Used by:Timeline
Symbol 38 TextUses:20Used by:40
Symbol 39 TextUses:20Used by:40
Symbol 40 MovieClipUses:38 39Used by:Timeline
Symbol 41 TextUses:20Used by:43
Symbol 42 TextUses:20Used by:43
Symbol 43 MovieClipUses:41 42Used by:Timeline
Symbol 44 TextUses:20Used by:47
Symbol 45 FontUsed by:46
Symbol 46 TextUses:45Used by:47
Symbol 47 MovieClipUses:44 46Used by:Timeline
Symbol 48 GraphicUsed by:50 53 68
Symbol 49 TextUses:20Used by:50 53 68
Symbol 50 ButtonUses:48 49Used by:69
Symbol 51 GraphicUsed by:52 58 62 66
Symbol 52 MovieClipUses:51Used by:67 69
Symbol 53 ButtonUses:48 49Used by:69
Symbol 54 TextUses:20Used by:67
Symbol 55 TextUses:20Used by:57 58
Symbol 56 TextUses:20Used by:57 58
Symbol 57 MovieClipUses:55 56Used by:58
Symbol 58 ButtonUses:51 55 56 57Used by:67
Symbol 59 TextUses:20Used by:61 62
Symbol 60 TextUses:20Used by:61 62
Symbol 61 MovieClipUses:59 60Used by:62
Symbol 62 ButtonUses:51 59 60 61Used by:67
Symbol 63 TextUses:20Used by:65 66
Symbol 64 TextUses:20Used by:65 66
Symbol 65 MovieClipUses:63 64Used by:66
Symbol 66 ButtonUses:51 63 64 65Used by:67
Symbol 67 MovieClipUses:52 54 58 62 66Used by:69
Symbol 68 ButtonUses:48 49Used by:69
Symbol 69 MovieClipUses:50 52 53 67 68 SS1Used by:Timeline
Symbol 70 GraphicUsed by:71
Symbol 71 MovieClipUses:70Used by:Timeline
Symbol 72 GraphicUsed by:Timeline
Symbol 73 GraphicUsed by:74 76
Symbol 74 MovieClipUses:73Used by:76
Symbol 75 SoundUsed by:76 79 87
Symbol 76 ButtonUses:73 74 75Used by:119  Timeline
Symbol 77 GraphicUsed by:78 79 87
Symbol 78 MovieClipUses:77Used by:79 87
Symbol 79 ButtonUses:77 78 75Used by:119  Timeline
Symbol 80 TextUses:20Used by:Timeline
Symbol 81 GraphicUsed by:Timeline
Symbol 82 FontUsed by:83
Symbol 83 TextUses:82Used by:Timeline
Symbol 84 TextUses:20Used by:Timeline
Symbol 85 TextUses:20Used by:Timeline
Symbol 86 GraphicUsed by:Timeline
Symbol 87 ButtonUses:77 78 75Used by:119  Timeline
Symbol 88 TextUses:20Used by:Timeline
Symbol 89 TextUses:20Used by:Timeline
Symbol 90 TextUses:20Used by:Timeline
Symbol 91 GraphicUsed by:93 94
Symbol 92 TextUses:20Used by:94
Symbol 93 MovieClipUses:91Used by:94
Symbol 94 ButtonUses:91 92 93Used by:Timeline
Symbol 95 EditableTextUses:20Used by:Timeline
Symbol 96 TextUses:20Used by:Timeline
Symbol 97 TextUses:20Used by:Timeline
Symbol 98 TextUses:20Used by:Timeline
Symbol 99 TextUses:20Used by:Timeline
Symbol 100 GraphicUsed by:102
Symbol 101 TextUses:20Used by:102
Symbol 102 ButtonUses:100 101Used by:119
Symbol 103 ShapeTweeningUsed by:119
Symbol 104 BitmapUsed by:105
Symbol 105 GraphicUses:104Used by:119
Symbol 106 TextUses:20Used by:119
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:119
Symbol 109 TextUses:20Used by:119
Symbol 110 BitmapUsed by:111
Symbol 111 GraphicUses:110Used by:119
Symbol 112 TextUses:20Used by:119
Symbol 113 BitmapUsed by:114
Symbol 114 GraphicUses:113Used by:119
Symbol 115 GraphicUsed by:117  Timeline
Symbol 116 TextUses:20Used by:117
Symbol 117 ButtonUses:115 116Used by:119
Symbol 118 TextUses:20Used by:119
Symbol 119 MovieClipUses:102 103 105 106 76 79 108 109 87 111 112 114 117 118Used by:Timeline
Symbol 120 TextUses:20Used by:Timeline
Symbol 121 TextUses:20Used by:Timeline
Symbol 122 TextUses:20Used by:Timeline
Symbol 123 TextUses:20Used by:Timeline
Symbol 124 TextUses:20Used by:Timeline
Symbol 125 TextUses:20Used by:Timeline
Symbol 126 TextUses:20Used by:Timeline
Symbol 127 TextUses:20Used by:Timeline
Symbol 128 TextUses:20Used by:Timeline
Symbol 129 EditableTextUses:20Used by:Timeline
Symbol 130 TextUses:20Used by:Timeline
Symbol 131 TextUses:20Used by:Timeline
Symbol 132 TextUses:20Used by:Timeline
Symbol 133 EditableTextUses:20Used by:Timeline
Symbol 134 TextUses:20Used by:Timeline
Symbol 135 TextUses:20Used by:Timeline
Symbol 136 TextUses:20Used by:Timeline
Symbol 137 TextUses:20Used by:Timeline
Symbol 138 TextUses:20Used by:Timeline
Symbol 139 TextUses:20Used by:Timeline
Symbol 140 BitmapUsed by:141
Symbol 141 GraphicUses:140Used by:Timeline
Symbol 142 EditableTextUses:20Used by:Timeline
Symbol 143 TextUses:20Used by:Timeline
Symbol 144 TextUses:20Used by:Timeline
Symbol 145 TextUses:20Used by:Timeline
Symbol 146 EditableTextUses:20Used by:Timeline
Symbol 147 TextUses:20Used by:Timeline
Symbol 148 TextUses:20Used by:Timeline
Symbol 149 TextUses:20Used by:Timeline
Symbol 150 TextUses:20Used by:Timeline
Symbol 151 TextUses:20Used by:Timeline
Symbol 152 TextUses:20Used by:Timeline
Streaming Sound 1Used by:Symbol 69 MovieClip

Instance Names

"bitchnigga"Symbol 18 MovieClip Frame 1Symbol 11 MovieClip
"bitch"Symbol 26 MovieClip Frame 1Symbol 11 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 2Symbol 31 as "song1"
ExportAssets (56)Timeline Frame 2Symbol 32 as "song2"
ExportAssets (56)Timeline Frame 2Symbol 33 as "song3"




http://swfchan.com/11/54661/info.shtml
Created: 21/4 -2019 12:20:35 Last modified: 21/4 -2019 12:20:35 Server time: 22/12 -2024 17:46:27