Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
Photo
- - - - -

Pre Loader Tutorial For Flash


8 replies to this topic

#1 jord2

jord2

    Newbie [ Level 2 ]

  • Members
  • 18 posts

Posted 30 June 2006 - 05:20 AM

Simple pre loader tutorial with play button by: Jordain Joyce

First of all open up flash then

Create 4 Layers and in order name them: Actions
Loader outline
Loader Bar
Content

Then create 3 frames for each layer.
Lets start in the actions layer, for the first frame make it blank and the second frame make it blank also. Press F9 to open the actions panel (make sure you are in the 2 frame of the actions layer) and put this in
myLoaded = Math.round(getBytesLoaded());
myTotal = Math.round(getBytesTotal());
myPercent = myLoaded/myTotal;
myBar._width = myPercent*170;
MyText = Math.round(myPercent*100)+"%";
if (myLoaded == myTotal) {
	gotoAndStop(3);
} else {
	gotoAndPlay(1);
}
Ok so now your done with the action layer now you move on to the Loader outline. Select the rectangle tool and create a box with a width of 170 and a height of 10. (to change the width and height just make any size box and then go to Properties and change it there). Ok so you have a rectangle with a fill inside the border so select the fill inside the border and right click it and cut it. Now you change in the loader bar layer and right click and select paste in place. Now select the fill and press F8 to make it a movie clip. Make sure when you are making it into a movie clip change the registration to the top left square!! Now once it is a movie clip go back to the previous screen with all the layers in it. So you are still in the loader bar layer so click on the rectangle just the filled one and go to properties and change its name myBar (you put the name in right beside where it has the swap button is.

For your loader outline and your loader bar on the third frame make it a blank keyrame.

Now to move on to your content layer, which is your play button. (I am only showing you how to make a play button, in another tutorial I will show you how to make a scene select button) Now make a rectangle or something that will be your button. Once you are done that click on it and press F8 and make it a button (you can make it a MC but for this tutorial I’ll keep it simple) Now once you finish making it a button (your registration is probably still in the top left I would suggest changing it back to the middle) you click on it once and press F9 to go into your action panel and copy and paste this in there

on (press) {
play();
}
For the frames for the content layer it doesn’t really matter if you leave it all with the button but if you want the button to only appear when it is done loading make the first two frames blank and the last frame you have your button in it. Here a picture to show you what all your layers and frames should look like.
Posted Image
Now to test this movie first create a new scene and import a large picture file. Now drag it on the screen. You do this so your pre loader has something to load. Now test your movie by pressing ctrl+enter twice. Remember twice so if you see your bar going across that means you got it. YAY!!!

If you have any questions just PM me.

Hope you found this tutorial handy this is my first tutorial I made =D

Remember NO stealing I spent time doing this and stealing isn’t cool >=(

Made by: Jordain Joyce

#2 OpaQue

OpaQue

    Administrator

  • Admin
  • 516 posts

Posted 30 June 2006 - 07:17 AM

Wow! Thanks for the Flash preloader tutorial :-) This is definately going to be handy :(

#3 jord2

jord2

    Newbie [ Level 2 ]

  • Members
  • 18 posts

Posted 30 June 2006 - 07:34 AM

Ya I am going to be making a couple more tutorials but they probably wont be as long as this one. Iam going to make a scene select button tutorial and how to make a good frame by frame movie. I would like to make a tutorial on how to make a basic game but I only know some gaming AS and the tutorial for it would be filled with mistakes :/

Edited by jord2, 30 June 2006 - 07:39 AM.


#4 techocian

techocian

    'Prentice de-Zighner

  • Members
  • 368 posts
  • Location:USA
  • Interests:Messin around with Photoshop, reading, Guild Wars, making up web design projects that always seem to end 2 weeks later.
  • myCENTs:93.97

Posted 30 June 2006 - 03:56 PM

I'll try this out right now. I haven't always been very good with Macromedia Flash and making movies using that program. So i hope i can learn a little more through your tuts. :(

#5 VexD

VexD

    Newbie [ Level 1 ]

  • Members
  • 3 posts

Posted 22 December 2006 - 02:20 AM

Theres a preloader that you can just edit and use for urself hosted at newgrounds.com

http://www.newground...dsPreLoader.fla

#6 Guest_FeedBacker_*

Guest_FeedBacker_*
  • Guests

Posted 23 April 2008 - 09:18 PM

how many Loaders can be use on the same page / adding links to external text file
Pre Loader Tutorial For Flash

Well I guess is clear ,,,, I hope ,,,, I am a new user and trying to learn some flash ,,,,, need to know how many Loaders I can use on the same page and if is possible to add to an external text that is been loaded with variables links to the text.Text file
I

-reply by Nano

#7 Guest_iGuest-shyju_*

Guest_iGuest-shyju_*
  • Guests

Posted 13 August 2008 - 07:20 AM

Help needed to create a preloader
Pre Loader Tutorial For Flash

Hi,
Friend, I want to create a preloader which consist of 5 diamonds, as the percentage is loader the diamond should glow. I.E. If the percentage loaded is 20% then 1 diamond should glow. When the percentage loaded is 40% two diamond should glow. I think you got what I mean to create. Can you help me with it. I think masking is not the proper way, since I tried it. It doesn�t work good.Please can you help me?

-question by shyju

#8 andreip

andreip

    Newbie [ Level 2 ]

  • Members
  • 12 posts
  • Gender:Male
  • Location:Romania, Bistrita
  • Interests:Soccer, Basketball, Web Design, Photoshop, Flash, Music, Movies, Friends.
  • myCENTs:57.18

Posted 15 March 2009 - 06:58 PM

Nice tutorial mate. I would like to see it in Action Script 3 too :mellow:.

#9 Guest_(G)Justin Gnatiuk_*

Guest_(G)Justin Gnatiuk_*
  • Guests

Posted 02 August 2010 - 12:25 AM

problem with the preloaderPre Loader Tutorial For Flash

 hey, overall great tutorial but I'm having a problem where the bar doesnt load...It just stays full and I can press the play button when the flash is fully loaded.

I also cant see your finished product picture perhaps you could send it to me via email?

I'm really close on this one and I want to make my own preloader for my next flash.

-reply by Justin Gnatiuk

 





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users