Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to place a "Loading Please Wait" Function????

Status
Not open for further replies.

JenovaChild

Programmer
Oct 8, 2001
5
AU
Hi,

I want to put an swf intro onto one of my sites, and, I want to know how I can have it, so it comes up with a "Loading screen" whilst the movie loads, and then once the movie has loaded, it starts playing, and the loading screen goes away ? How would I do that ?

Thanx . "Death smiles at us all; all a man can do is smile back."
 
If you give me your email i'll send you a fla later today

>:):O>
 
go to FAQ's this question is asked way to may times and i still dont know how tX-) answer it


@!#$@#%#

deeeeceeeee
 
Nor, if I may say so Deecee, have you been able to make those preloaders work (most of Dave's faqs are now dead links anyways!), in spite of all my help.

Regards,
mywink2.gif
ldnewbie
 
Sharky,

My E-mail is Trunks_IX_PSA@hotmail.com

Thanx. "Death smiles at us all; all a man can do is smile back."
 
I think I can help on this one, I feel like typing.

First make the first scene of the movie your loading screen. Create a movie clip with whatever type of text you want or whatever. In the first frame of the loading scene, put your clip with the following actions attached to the clip.

onClipEvent(enterFrame){
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
percent = (loaded/total)*100;
if(percent == 100){
_root.gotoAndPlay(2);
}
}

now create a second keyframe in the next frame with the same clip but add these actions to it

onClipEvent(enterFrame){
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
percent = (loaded/total)*100;
if(percent == 100){
_root.gotoAndPlay("your intro scene", 1);
}
}

now just put a stop action in the first frame of the scene and thats it, hope that helps.
 
Thanx Recruiter, but I can't seem to find the percent loaded, and the _root actions.

This is what I have so far.

onClipEvent (enterFrame) {
_totalframes.getBytesTotal();
}
onClipEvent (load) {
_framesloaded.getBytesLoaded();
}


is that right so far, Its not much, but I can't find how to do the next part. "Death smiles at us all; all a man can do is smile back."
 
Jenova,

Although the above script will work, it's far from being perfect... And for one thing, you'll allways see a flash frame of the preloader before the movie plays.

The easiest, is to copy each of the above scripts (highlight in the post + Ctrl C) and paste it in the movie clip's Object Actions window with Ctrl V.
You can do that, if from the top left arrow menu of the Object Actions window, you select Expert mode, rather than the Normal mode.

Once you've pasted the script, you can switch back to Normal mode... That way you can see if you have syntax errors, 'cause Flash won't let you switch back to Normal mode if you have errors, and will even list them in the Output window.

Regards,
mywink2.gif
ldnewbie
 
OldNewbie,

Yeah, I was still trying to figure it out, thanks for the .fla ! "Death smiles at us all; all a man can do is smile back."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top