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

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

Preloader basics.swf

This is the info page for
Flash #56129

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


Text
Hello and welcome to this tutorial!

Here I'll show you how to make an
awesome preloader for your flash

:D

I'll explain EVERYTHING you have to
do so you don't get lost.

<p align="left"><font face="Trebuchet MS" size="16" color="#000000" letterSpacing="0.000000" kerning="1">loadedbytes = getBytesLoaded();</font></p><p align="left"><font face="Trebuchet MS" size="16" color="#000000" letterSpacing="0.000000" kerning="1">totalbytes = getBytesTotal();</font></p><p align="left"><font face="Trebuchet MS" size="16" color="#000000" letterSpacing="0.000000" kerning="1">percentbytes = int(loadedbytes/(totalbytes/100));</font></p><p align="left"><font face="Trebuchet MS" size="16" color="#000000" letterSpacing="0.000000" kerning="1">tellTarget (_root.loader) {</font></p><p align="left"><font face="Trebuchet MS" size="16" color="#000000" letterSpacing="0.000000" kerning="1">gotoAndStop (_root.percentbytes);</font></p><p align="left"><font face="Trebuchet MS" size="16" color="#000000" letterSpacing="0.000000" kerning="1">}</font></p>

First of all, Open your flash document and open actions
on the very first frame. then copy-paste this code

<p align="left"><font face="Trebuchet MS" size="22" color="#000000" letterSpacing="0.000000" kerning="1"><b>Then, insert a blank keyframe right <sbr />next to the first one and open actions. <sbr />Then copy-paste this code</b></font></p>

if (loadedbytes == totalbytes) {
nextScene ();
}else{
gotoAndPlay (1);
}

<p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>Now, we have to double click layer 1 <sbr />and then change his name to &quot;actions&quot;</b></font></p>

<p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>Don&apos;t add the &quot;s</b></font></p>

<p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>We should now have something like this</b></font></p>

<p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>Now add a layer and name it &quot;loader&quot;, so don&apos;t </b></font></p><p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>touch anything and you should see something </b></font></p><p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>like this</b></font></p>

<p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>Don&apos;t add the &quot;s</b></font></p>

<p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>Now on the loader frame create a </b></font></p><p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>Movie Clip (Ctrl+F8)</b></font></p><p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>and name it loader. Then inside the movie </b></font></p><p align="left"><font face="Trebuchet MS" size="20" color="#000000" letterSpacing="0.000000" kerning="0"><b>clip, create 2 layers so you now have 3.</b></font></p>

Now we have to create frames in all of the
3 layers to make they all reach 100

Now, on Layer 3, make a rectangle, with
no fill.

On Layer 2, make the fill of the rectangle of the
colour you want, but ONLY the fill, and
make it fit on the border

Now click on the circle under
the eye and under the lock,
on Layer 2, so that it looks like
this

On Layer 1, add the same fill as in Layer 2, in the same
place.

On Layer 1, go to frame 100 and turn it into a keyframe.

Now, on frame 1 of  Layer 1, move the fill so that its
aligned to the left side of the border

Now, select all frames from Layer 1, from 1 to 100, and
Click Create Motion Tween.

Now that you have the tween, right-click Layer 2
and click mask.

Then click the cross on Layer 2 so that it dissapears

You should see this:

So, we've finished the bar! But it's not done yet.
We still have o add the %.

So go out of your bar and place a loader on the
center of the screen on loader Layer
(If you still haven't).

Now, under the bar, create a text and write a 0. And change it to
Dynamic text

Next to the dynamic text add a static text with the
sign %

Now, right next to where it says Var: write
"percentbytes" with no ".

At this point you will think you have all done.
In fact, its true, but here we can add the bytes
you have loaded :O

So now create another dynamic text with the 0
inside it. In this case, write "loadedbytes".

Now in a static text write an / and put it right
next to the 0.

Now, write ANOTHER dynamic text with a 0 and put
it right next to the /. In the var name write totalbytes

Create a static text with "bytes" wrote on it next to the previous 0

Congratulations! You've succesfully created a loader bar!
I hope this helps your flash :D

ActionScript [AS1/AS2]

Frame 51
stop();
Frame 52
stop();
Frame 53
stop();
Frame 54
stop();
Frame 55
stop();
Frame 56
stop();
Frame 57
stop();
Frame 58
stop();
Frame 59
stop();
Frame 60
stop();
Frame 61
stop();
Frame 62
stop();
Frame 63
stop();
Frame 64
stop();
Frame 65
stop();
Frame 66
stop();
Frame 67
stop();
Symbol 46 Button
on (release) { getURL ("http://www.newgrounds.com", "_blank"); }
Symbol 48 MovieClip Frame 40
stop();
Symbol 74 Button
on (release) { startMovie(); }
Symbol 75 MovieClip Frame 1
function timerHandler() { if (!loadingComplete) { var _local4 = _root.getBytesLoaded() / _root.getBytesTotal(); bar._xscale = 100 * _local4; if (_local4 == 1) { loadingComplete = true; if (AUTO_PLAY) { startMovie(); } else { gotoAndStop ("loaded"); } return(undefined); } } dt = getTimer() - time; time = time + dt; frameAccum = frameAccum + dt; var _local3 = 0; while ((frameAccum >= FRAME_TIME) && (_local3 < MAX_FRAME_SKIP)) { advanceFrame(tankLogo, true, true); advanceFrame(loadingText, false, true); advanceFrame(barGfx, false, true); if (loadingComplete) { advanceFrame(this, false, false); } (frameAccum = frameAccum - FRAME_TIME); _local3++; } updateAfterEvent(); } function advanceFrame(clip, recurse, loop) { if (!clip) { return(undefined); } clip.stop(); if (clip._currentframe == clip._totalframes) { if (loop) { clip.gotoAndStop(1); } } else { clip.nextFrame(); } if (recurse) { for (childName in clip) { if (typeof(clip[childName]) == "movieclip") { advanceFrame(clip[childName], recurse, loop); } } } } function startMovie() { clearInterval(intervalId); _root.play(); } _root.stop(); stop(); var FRAME_TIME = 33.3333333333333; var AUTO_PLAY = false; var MAX_FRAME_SKIP = 5; var loadingComplete; var intervalId; var time; var frameAccum; loadingComplete = false; intervalId = setInterval(this, "timerHandler", FRAME_TIME / 2); frameAccum = 0; time = getTimer(); timerHandler();
Symbol 86 Button
on (release) { nextFrame(); }
Symbol 91 Button
on (release) { prevFrame(); }

Library Items

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

Instance Names

"bar"Symbol 75 MovieClip Frame 1Symbol 4 MovieClip
"bargfx"Symbol 75 MovieClip Frame 1Symbol 7 MovieClip
"tankLogo"Symbol 75 MovieClip Frame 1Symbol 43 MovieClip
"bargfx"Symbol 75 MovieClip Frame 2Symbol 7 MovieClip
"loadingText"Symbol 75 MovieClip Frame 2Symbol 48 MovieClip
"bargfx"Symbol 75 MovieClip Frame 20Symbol 7 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.

Labels

"LOAD"Symbol 75 MovieClip Frame 1
"COMPLETE_STOP"Symbol 75 MovieClip Frame 2




http://swfchan.com/12/56129/info.shtml
Created: 19/4 -2019 17:51:51 Last modified: 19/4 -2019 17:51:51 Server time: 05/11 -2024 09:22:42