Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Web [Tut]How to create an Adove Flash Preload screen

Status
Not open for further replies.
Newbie Spellweaver
Joined
Aug 8, 2009
Messages
24
Reaction score
2
NOTE; THIS TUTORIAL IS MADE FOR USERS WHO DO HAVE EXPERIENCE WITH FLASHPLAYER CS3/ ADOBE CS4/ MACROMEDIA, one of those <<.

In this tutorial i will be showing you how to make an preload screen.

YOU WILL NEED:
Computer with internet access
Adobe cs4/ flash cs3/ macromedia. one of them
EXSISTING ACTIONSTRIPT 3.0 WEBSITE.

STEP 1:
Launch your adobe/flash/macromedia. and open your flash website files.. (.fla) switch the word space layout by clicking the icon on the top right "Essentials" or find that, and select "Designer"
You may not need to do this.

Step 2:
In the timeline panel, select all of your layers, (hold down ctrl i believe) [YOur highlighting them).
Click and drag the first frame of the top layer, one space to the right, creating a blank space under "1"

Step 3: (creating the loading bar)
highlight(select) the bottom layer of the timelime and select the
rectangle tool. THEN in properties change the stroke and rectangle colors [TIP: MAKE SURE THEY DO NOT BLEND IN THE BACKGROUND. i would also change the size of the stroke to around 3..] Draw a rectangle in the center of your webpage, make sure it does not blend.

Step 3 cont.
Select the selection tool(cursor) and double click the rectangle
Click F8, to bring up the convert to symbol box.
CHANGE THE NAME TO, "outline" and make sure its a movie clip, THE REGISTRATION SHOULD BE THE TOP LEFT BOX, do not use "" in outline.
Now click the center of the recatngle once, just to select the rectangle, and click F8, change the name to "rectangle", movie clip, and the registration is the middle one on the far left.
Now go to the properties panel and change the instance name to
rectangle_clip

Step 4:
Now select the text tool and make sure its DYNAMIC TEXT.. Make the font whatever, I use "Arial"
Now draw a text box DIRECTLY below the rectangle, Leave a little space between. the properties instance name for this should be "text_clip".

Step 5:
MAKE SURE THE FIRST FRAME OF THE BOTTOM LAYER IS SELECTED.. and hit F9 to bring up action script...
copy this code exactly.

Code:
stop();

this.addEventListener(Event.ENTER_FRAME, preload1);

function preload1(e:Event):void{
	var total_bytes:Number = this.stage.loaderInfo.bytesTotal;
	var loaded_bytes:Number = this.stage.loaderInfo.bytesLoaded;
	rectangle_clip.scaleX = loaded_bytes/total_bytes;
	text_clip.text = Math.floor((loaded_bytes/total_bytes)*100)+"%"
	if (total_bytes==loaded_bytes) {
		gotoAndPlay(2);
		this.removeEventListener(Event.ENTER_FRAME, preload1);
	}
}
Step 6:
exit that, i believe it saves.
Preview it, Control, Test movie... or I believe ctrl+enter.

Please comment below if this help, if you have errors I might be able to help you.


If you cant find properties panel, its under tools> panels> properties.. and also for when i said

"MAKE SURE ITS THE FIRST FRAME OF BOTTOM LAYER, witch should be actions, you can right click then go down to actions.. and copy the code there. There are different ways to do all of this stuff..
 
Status
Not open for further replies.
Back
Top