Is there any way to add that preloader to a button action thats loading the swf file inot the movie clip?
Printable View
Is there any way to add that preloader to a button action thats loading the swf file inot the movie clip?
Hi again,
nklein I am looking into this for you.
I thought that most Mac's came with Stuffit Expander
which is supposed to decompress win zip files.
Here is the URL to another decompressor I found
(have not tried it) It is supposed to decompress
Win zip on a mac.
http://www.maczipit.com/download.html
Hope this helps ... let me know????
foochuck the Example file for part Three should be added to
this thread later today. If you want to see it in action
though I will be uploading "some" running examples to
my Web space.
The example of the preloader (loaded from a button) with
preloader bar is viewable at:
http://www.trump.net.au/~Milosav/example3
The Example files part_Three will be loaded up here later
today.
As far as buttons still being active even though they are
covered by loaded movies.
Both the Button Object and the Movie Clip Object have the
property "enabled". So if you have a button with the instance
name myButton then the following script with make it inactive
to events.
myButton.enabled=false; //will not recieve events.
myButton.enabled=true; //will recieve events.
or you can have a Movie Clip insatnce called mc_holder it's the
same script(all the buttons in that Movie Clip instance will be disabled)
mc_holder.enabled=false;
What script are you using to load in your audio???
If you want to unload a Movie Clip with a button then.
yourLoadButton=function(){loadMovie("Movie1.swf"," mc_holder1");}
yourUnloadButton=function(){unloadMovie("mc_holder 1");}
I would keep in mind however that if you try to unload a
.swf file that is still loading it can "sometimes" crash the
Flash player. I prefer to not take the chance so I have a
single Frame Blank.swf (less than 1kb) and load this .swf
instead. ie:
loadMovie("Blank.swf","mc_holder1");
As you can see there is no need to unload a Movie Clip to
place different content in it .... loadMovie() just replaces
what was in the Movie Clip with the new .swf file or .jpg.
Will lodge part Three later today. Pre-loaders and Pre-loader
bars.
Milosav
Hi again,
Well part Three is done. It is too large to lodge here so
you can download it with the following URL:
http://www.trump.net.au/~Milosav/exa...part_three.zip
Have a good look over the files. Any questions post back.
If you want more ... ie. part_Four post back and I will
put it together.
Milosav
I would love to see a part four!
milosav, your code makes a lot of sense, but I'm trying to integrate it on a preloader script that I've been working on for days, and it just isn't working. I'm dynamically creating containers and I can't figure out how to get it all to work together. would you mind glancing over it?
Milosav you are the man!!! Your code has helped me so much. It's also given me a lot of great ideas of things I can do in flash that I never thought of before...I would definitly like to see a part IV. Hmm...perhaps loadmovie Episode IV - A New Hope. :smoov:
Thanks again!
Hi tgfx,
If you attach a .fla file of what you are doing I will
check it out. If the whole file is too large for this forum.
Try and post the important section.
nklein .... have you found a solution to the mac / windows
file problem ????
If you have let me know so I can stop looking.
Does anyone have an answer to nklein's problem????
foochuck Yes you can do a LOT with actionscript.
justplainsoccer Part 4 on the way soon.
If anyone has a problem or ? about the files or script
just post here.
Milosav
Milosav
milosav, here's the file . couldn't remember how to set subdirectories through winzip, so you will have to make an images directory and put art 1-5 in there to test.
everything works ok until it's uploaded, then it will hang on loading 1, so that's why I think your code will work better.
Milosav,
I just checked out Part 3...good stuff.
Question - Now I think you will answer this when you release part 4, but I'm wondering...
I have about 7 buttons in my movie. Each one loads a different .swf into the same empty movie clip...they are actually sound files in each .swf...so I don't need more then 1 on at a time...so each one just replaces the other when clicked..alright my question is...I sort of adapted the button preloader before I saw part 3 and it was working. But instead of re-writing the preloader script along with each button action to load the swf into the empty movie clip...how can I make this more streamlined...but I believe you'll answer this with your next release..preloader in each external swf.
By the way...where did you learn Actionscript? Classes...? Is there a book you read or that you recommend...please advise :smoov:
Hi foochuck,
In your case I would place the preloader code in a
centralized function. Then just call this function which
loads what ever "Movie.swf" you want.
Example:
Your MainMovie that loads the .swf files. Frame 1:
stop();
//flag is a file loading.
fileLoading=false;
function loadAudioFile(theURL){
loadMovie(theURL,"mc_holder1");
if(!fileLoading){
{fileLoading=true;
loaderInterval=setInterval(loadChecker,100);
}
}
function loadChecker(){
if(mc_holder1.getBytesLoaded()>=mc_holder1.getByte sTotal)&&
mc_holder1.getBytesLoaded()>0)
{ fileLoading=false;
clearInterval(loaderInterval);
}
}
button1.onRelease=function(){loadAudioFile("movie1 .swf");}
button2.onRelease=function(){loadAudioFile("movie2 .swf");}
button3.onRelease=function(){loadAudioFile("movie3 .swf");}
//////////////////////
I think this could work for you ...
Here we are reusing script so that we do not have multiple
pre-loader code everywhere. This seems to be a possible
solution given that you are loading into the same Movie Clip
instance.
You could even call this function from another Movie Clip
or Level with:
_level0.loadAudioFile("Movie2.swf");
Of course I would TEST this first there may be need to tweak
the script.
Milosav
p.s I think that pre-loader script in the Movie being loaded
works better when you just need something loaded without
taking too many data managing responsibilities. Keeping the
script centralized help in keeping things simple.
Hi tgfx,
Sorry it has taken me so long to get back to you.
I looked over your files and checked out the graphics.
I need you to paint me the picture of your design.
Like:
What happens when you press the menu buttons??
Where do the images go??
So I can see what you want.
Post back so we can get started.
Milosav
Hi foochuck,
To tell you the truth my understanding of actionscript is
only new. So my understanding is still limited.
But I have spent a lot of years programming real-time
3D graphics in C/C++.
The similarity of computer languages means that knowledge of
one language means you can easily shift to another language.
You as a flash developer, when you change the properties
of a Movie Clip instance ... you are programming in an
Object oriented language. If you spent some time with
actionscript then picked up a book on C/C++ application
development you would be suprised how similar it all is.
I ask a lot of questions and enjoy increasing my knowledge
of a subject ... read lots of tutorials.
Milosav
hey milosav,
I removed a lot of content so that the download wouldn't be bad for you.
ok, when a menu button is clicked, another set of icons pops in, in the same area as the last icons. whenever that happens, all of the container mcs are reloaded and the buttons become active for the new thumbnails. it's inefficient but it works, and at least they stay in cache. the first time they load, they should show the loading bar for each image (or one bar for all images), and mostly, not hang on loading number 1.
I think that about covers it. :)
Milosav,
With the latest preloader you have posted for me...Do I still need a 'stop' action in the first frame of all movies that will be loaded into the main movie mc ?
Milosav,
This is what my code looks like...
stop();
//flag is a file loading.
fileLoading=false;
function loadAudioFile(theURL){
loadMovie(theURL,"mcholder1");}
if(!fileLoading){
{fileLoading=true;
loaderInterval=setInterval(loadChecker,100);
}
}
function loadChecker(){
if(mcholder1.getBytesLoaded()>=mcholder1.getBytesT otal()&&
mcholder1.getBytesLoaded()>0)
{ fileLoading=false;
clearInterval(loaderInterval);
}
}
but_but1.onRelease=function(){loadAudioFile("male1 .swf");}
but_but2.onRelease=function(){loadAudioFile("male2 .swf");}
but_but3.onRelease=function(){loadAudioFile("male3 .swf");}
but_but4.onRelease=function(){loadAudioFile("male4 .swf");}
but_but5.onRelease=function(){loadAudioFile("male5 .swf");}
but_but6.onRelease=function(){loadAudioFile("male6 .swf");}
but_but7.onRelease=function(){loadAudioFile("male7 .swf");}
Please advise if all looks well..I modified the names of the swf files, the movie clip instance name...also got a couple errors when I used your original script posted I had to add a ')' and also '}' around line 6...
:smoov:
One more request Milosav..sorry...could you explain the preloader to me..I'd like to know how it works...also what symbols like && mean...let me know if you can...thanks.
foochuck,
you can find out everything you ever wanted to know about symbols (&& += == and so on...) on the macromedia website.
here's a preloader...
http://www.macromedia.com/support/fl...or_frame01.htm
and here are symbols...
This is the place to find out everything about actionscript...
Hope that helps.
Aaron
Milosav,
Also for this preloader I'd like to show a still graphic or something just to show that the file is loading...my sub-movies are around 200 KB and up and for people on dial up, after they click the button they might not know they file is loading....
Hey, i have one queston. how would you use a preloader with multiple swf's? Thanks.
Aaron
Hi again,
First Aaron:
How you would handle a preloader for mutiple .swf's
depends a lot on how much control you want over the loading,
and if you want some kind of progress bar/report while they
are loading.
The most basic preloader would be to make the first Frame of
the Movies you are LOADING blank with just the stop(); action ..
the rest of the Movie would start after Frame 1.
Then in your main Movie:
loadMovie("Movie1.swf","mc_holder1");
loadMovie("Movie2.swf","mc_holder2");
loadMovie("Movie3.swf","mc_holder3");
Then when you want one to play just use:
mc_holder1.play();
This way however does NO load checking. But it is a basic
multi .swf preloader.
I will put together a simple multi .swf pre-loader and you
can have a look at it.
If you are into reading tutorials you should check out
Colin Moock's stuff ... he really knows a lot and can
present it in an easy to understand way.
http://moock.org/webdesign/flash
foochuck:
Glad you checked the script. I have not even tested this
so as I said it may need to be tweaked.
You can easily add a progress bar to the script or some
other graphics for your user. At 200kb I think it would be
a wise choice.
Flash is built to stream Movie content. So if you don't place
a stop(); the Movie will start playing. Sometimes this is OK.
But preloaders seem to be used a lot to ensure a good
user experience given the limitations of bandwidth. ie.
your Movie plays without the stutters and stops that will
happen if the Movie can not stream fast enough.
You could use the preloader from the example part 3 and
add it into your current script.
So it would look something like this.
stop();
loadMovieNum("Bar.swf",4);
//flag is a file loading.
fileLoading=false;
function loadAudioFile(theURL){
loadMovie(theURL,"mcholder1");}
if(!fileLoading){
{ //show your loader bar
_level4.theBar._visible=true;
//position your loader bar
_level4.theBar._x=250;
_level4.theBar._y=200;
//set your bar to start position
_level4.theBar._xscale=0;
fileLoading=true;
loaderInterval=setInterval(loadChecker,100);
}
}
function loadChecker(){
if(mcholder1.getBytesLoaded()>=mcholder1.getBytesT otal()&&
mcholder1.getBytesLoaded()>0)
{ fileLoading=false;
//hide your loader bar
_level4._visible=false;
clearInterval(loaderInterval);
}
//scale your loader bar
_level4.theBar._xscale=(mc_holder1.getBytesLoaded)/mc_holder1.getBytesTotal())*100;
}
but_but1.onRelease=function(){loadAudioFile("male1 .swf");}
but_but2.onRelease=function(){loadAudioFile("male2 .swf");}
but_but3.onRelease=function(){loadAudioFile("male3 .swf");}
but_but4.onRelease=function(){loadAudioFile("male4 .swf");}
but_but5.onRelease=function(){loadAudioFile("male5 .swf");}
but_but6.onRelease=function(){loadAudioFile("male6 .swf");}
but_but7.onRelease=function(){loadAudioFile("male7 .swf");}
I will make a working example of this and upload it with example
files to my web space. I can also make sure that it is working.
So I will post you about that soon.
There is a lot of information about actionscript operators
right in the Dictionary that Flash MX has.
Symbols like && == > < are called operators and are used in
all sorts of ways.
Lets look at this script.
bytesLoaded=100;
bytesTotal=300;
if(bytesLoaded>=bytesTotal && bytesLoaded>0)
{ gotoAndPlay(2);}
if( ) is a conditional statement.
If the "condition" within the ( ) is true then the statement
within the { body } of the if statement will execute in this
case gotoAndPlay(2);.
> is the "greater than" operator
>= is the "greater than or equal to" operator
&& is the "and" operator
If we break down the script into something easier to understand
then it starts to make more sense.
If bytesLoaded is greater than or equal to bytesTotal, and
bytesLoaded is greater than 0 ... gotoAndPlay(2)
In our example above:
bytesLoaded is NOT equal to or greater than bytesLoaded ... so gotoAndPlay(2); will not happen.
It is not too difficult if you know what these symbols mean.
It is a very good idea when you write your own scripts to
use names that make sense to you.
For example:
pqz=100;
h79=20;
if(pqz>h79)
{Movie578w.gotoAndPlay(4);}
Or
the_chance_of_a_sunny_day=100;
the_chance_of_rain=20;
if(the_chance_of_a_sunny_day > the_chance_of_rain)
{ day_at_the_beach_Movie.gotoAndPlay(4);}
Much easier to understand ... a bit of "overkill" but clear.
It is a very good idea to know how things work, especialy your
own projects.
Milosav
Milosav
Hi foochuck,
I have put an example together for you it is base around
the other examples but includes the script we were talking
about.
There are a few typo's corrected (my errors) now it is
running on my web space. If you were going to use this script
some extra flag variables should be added. I can help you with
that. The zip files only contain the .fla file for MainMovie
... to keep the size down. The other Movies just have a
Frame 1 with only a stop(); action and the other content
comes after Frame 1.
Anyway ... you can view it at:
http://www.trump.net.au/~Milosav/example5
and download the zip file at:
http://www.trump.net.au/~Milosav/exa..._part_Five.zip
Any ? Post Back
Milosav
hey, don't mean to bug, but did you get a chance to look over the code yet?
Hi tgf,
Yes I had a look at the files. I put togeter a slightly different
preloader code that includes a preloader bar.
It works for me.
Windows 98 Second Edition
Internet Explorer v6
and a connection from the "wilderness" at 14400bps
It is uploaded to my site:
you can view it at:
http://www.trump.net.au/~Milosav/tgfx
and you can get the .zip file at:
http://www.trump.net.au/~Milosav/tgfx/neonA.zip
Have a GOOD look through them.
Your preloader bar is now a seperate .swf file that is
loaded into _level4 then called when needed. At the moment
the progress bar is just a rectangle but it could be almost
anything you wanted.
All the script for the sequential preloading including
the bytes checks are in one centralized place.
About the same place they were before. But the function and
loop have been broken up over Frame 51,52,53,54 of nc-loader.
This has striped it down to almost the bare essentials and
it is easier to see what is going on.
If you think it is heading in the right direction we can
tighten the code then roll it back up into a function.
But it is easier to work on like this ... at the moment.
The .swf files are loaded up the pipeline one at a time
when one is fully loaded the next one is sent up. Each has
a full progress bar. There are a lot of reasons for doing
it this way ... if you want to know what they are just ask.
Post back let me know if it all works for you.
Milosav
hey milosav, thanks for responding. I couldn't extract the files from the zip though, it says it's corrupted. I did look at your example that you uploaded, and it doesn't hang, so that's great. I can't wait to check out the fla.
Hi tgfx,
Well you were right file was dead.
I have uploaded a new .zip file.
Strange thing though the nc-loader.fla file seems to
have grown in size. The final published .swf is around the
same file size as always. But the original .fla is around 1MB !!!
So the .zip file is around 1/2 MB. Very strange.
The B - I - G .zip is at.
http://www.trump.net.au/~Milosav/tgfx/neonA.zip
Anyway any more problems or questions post back.
Let me know if it is headed in the right direction.
Milosav
hey milosav,
that's weird about the file size. there is absolutely no reason for it to be THAT big. anyway I looked at what you've done and it makes a lot more sense, plus it works!!
the only thing that I'd like to change is to have the loading bar work with the loadcount numbers at the bottom. so the bar fills up and then the number progresses to "2", etc. I don't think that would be hard to do though.
one question, would it be possible to check the containers to see if they're loaded, before loading them? the only thing I don't like about this is that it loads them every time the frames are accessed.
Milosav,
Once again that info helps/makes alot of sense. Looking forward to your preloader post...
Thanks
Milosav,
Sorry for the last post..I didn't see the NEW page of posts and I did get your preloader part 5 file. One question about the script...why do I need this line:
//scale your loader bar
_level4.theBar._xscale=(mcholder1.getBytesLoaded()/mcholder1.getBytesTotal())*100;
}
I'm not sure what it does...I believe it makes the bar.swf file bigger as the movie loads...I might replace bar.swf with just a still file or a movie clip that loops..if I do this..I believe I can remove this line...will I have to modify anything else in the script?
:smoov:
Hi,
First tgfx,
Yes I agree that there is no need to return to the
"loading frame" if the current image set is already loaded.
It would be very easy to incorporate oyur text count
into the preloader.
I will check which way seems best for both these issues
and post back with some ideas and script.
foochuck did "example 5" answer you question or is this not
useable in your situation?? Wondering how you are going with
your script???
aaron:
I will put an example together of a multi .swf preloader and
let you know when it is completed.
Milosav
Milosav
Hey again guys.
Thanks to this post i've learned a buttload of new stuff. But.. I've got one tiny problem, i've got a preloader in an swf that come before my movie and it seems to work fine but it only shows up after its 20% loaded. Any idea what thats about? If you need more details just post back and i'll see what i can do. It will take me a while to get back to you as i will we at school all day tomorrow. Life's tough for a freshmen. :) Well, off to bed. :zzz:
Thanks for all your help.
Aaron
Milosav,
Please see my previous post to this thread...
Thanks :cool:
Milosav,
I've thought of another question for you. For these techniques we're using...what about for when distributing flash movies on cd-roms or intranets...theres no bandwith problems...but I like the option of loading movies into my main movie...is there a way to do this with just one flash movie somehow...? Or perhaps when working in Macromedia Director...I've tried using the loadmovie technique in there and it doesn't seem to work...any ideas on this???
:mrpimp:
Hi again,
You guy's are really keeping me busy ... I am enjoying
our communications.
First foochuck:
If you look at the Bar.fla it is a main timeline that holds
a Movie Clip instance named "theBar".
The Movie Clip instance named "theBar" contains a simple rectangle.
So when we loadMovieNum("Bar.swf",4);
We are loading all of this into _level 4.
So:
_level4._invisble=false; Makes EVERYTHING on _level 4 invisible including the MC instanced called "theBar".
_level4.theBar._xscale=50; This scales ONLY the MC with the
instance name "theBar" which is on _level4.
_level4.theBar._x=200; Moves ONLY the MC instance named
"theBar" to an x position of 200.
So then:
_level4.theBar._xscale=(mcholder1.getBytesLoaded()/mcholder1.getBytesTotal())*100;
Scales the MC instance on _level4 named "theBar" to the
current percentage file loaded.
Yes you could have just about anything that you wanted as a
preloader. But you don't replace Bar.swf you open Bar.fla
open the MC instance named "theBar" and place what ever you
want in this MC. If it was an animation you would not
scale it but most probably start it at the begining of the load
with say _level4.theBar.gotoAndPlay(2); and stop it with
_level4.theBar.gotoAndStop(1);
Aaron:
Yes more details please.
1. On what frame is your pre-loader bar?
2. On what level is your pre-loader bar?
3. Where is your preloader actionscript?
ie: getBytesLoaded or getFramesLoaded stuff.
4. How large is the .swf file you are loading?
5. Are you loading other .swf files at the same time?
6. Does this happen when you are testing on the web?
Catch you
Milosav
Milosav,
When I load my movie and go the frame where thebar.swf is loaded into level4 this movie shows up right away and is not hidden. After I load one of the other movies it works..but I can't get this layer to hide until one of the other levels is loaded...
Nevermind Milosav..I found the problem..I had remade the bar.fla movie and didn't put the code:
visible=false In the first frame.
As for how these buttons are working I see that they only work when the actions for the button are in the same frame as the button. So I'm guessing this isn't a 'global' script? What I mean by this is that the script HAS to be in the same frame as the buttons in order for the buttons to work since theres no action on the buttons, but rather the actions called from the script.
Milosav,
I am at school right now so i can't get all the details on my preloader but i can remember most of it. Here's how i have it set up.
I've got the preloader in a seperate swf and in that i have 4 frames.
1st frame is intializing the text fields and the loader bar. (I have it set up basically like this here http://www.flashkit.com/tutorials/Ac...-689/index.php )
2nd frame is theand my bar is a bunch of script like :Code:GetBytesloaded
3rd frame isCode:_xscale=(getbytes....and so on. that works fine)
And all that is in the seperate swf. So I put this in my first frame of my main movie:Code:gotoAndPlay(2)
Code:loadmovie("loader.swf","loadhold_mc")
Milosav,
I am at school right now so i can't get all the details on my preloader but i can remember most of it. Here's how i have it set up.
I've got the preloader in a seperate swf and in that i have 4 frames.
1st frame is intializing the text fields and the loader bar. (I have it set up basically like this here http://www.flashkit.com/tutorials/Ac...-689/index.php )
2nd frame is the GetBytesloaded and my bar is a bunch of script like :3rd frame is gotoAndPlay(2)Code:_xscale=(getbytes....and so on. that works fine)
And all that is in the seperate swf. So I put this in my first frame of my main movie:
I dont know what level of my movie i have my loader at. How can i find out?Code:loadmovie("loader.swf","loadhold_mc")
Main movie Consists of : two frames (one for the main and one before that for the loader). something like 5 layers. 2 swf's loaded into the main movie(one for a nav bar and one for a little title thingy)
No, i haven't tried it on the internet yet i've just done show streaming. I dunno the size til i get home. The loader works fine but it doesn't show up til its 20% done with the whole movie. And its not a wicked huge loader so i just cant figure it out. Hope this helps a bit. One more thing. When my loader gets to 100% it just stops. But in the script of the loader i have
Should i have _level0.gotoandPlay(2) or what? I will try to zip it up and post it when i get home but class ends at 9:35 so i gotta go.Code:if(getbytesloaded==totalbytes)(or whatever the script is){_root.gotoAndPlay(2}
Any more q's just post
Thanks
Aaron
Hey Milosav..that preloader works great..everything you've explained does work great. Would you advise using a preloader like that for a regular flash movie? Perhaps loading the preloader onto a seperate level and then removing it after the movie has loaded...? If I were to use that preloader within a movie that is going to load itself, how would I go about modifying the script? Please advise.
:doughnut:
Milosav,
I put the whole thing together in a zip but its too big for the board so i put it in my space
http://aaronfrancis.home.mindspring.com/loadprob.zip
If there is anything missing just post back.
Thanks
Aaron
Hi everyone,
Aaron
thanks for the files I will have a look at them
after this post. Will get back to you after I've had a
look.
foochuck
First an earlier question. Publishing to CD.
You can use a flash Projector to publish flash on CD. Windows
or Mac. And it is a method used exstensively in marketing
material, portfolios and presentaions.
These are publish as .exe files under Windows and .projector
files under Mac. They of course are not dependent on a browser
But in the Flash Player. You can use the fscommand to change the display parameters.
ie:
fullscreen
allowscale
trapallkeys
showmenu
exec
quit
By using the Stage Object and the System.capabilities Object
You can adjust your presentation to fit the screen dimensions
resolution etc.
To publish a projector in Flash MX just chose formats from
the Publish settings and select Macintosh projector or
Windows projector.
You will then find the .exe or .projector file in the folder
with your .fla file. When you open it it will play in a Flash
projector. If you have external.swf files they are loaded in
just as usual. Of course you can really go to town if
publishing for CD ... the sky is the limit. And you may not
need any preloaders at all.
Pre-loader in movie loading itself.
If you are using a preloader in the movie you are loading or
loading it into a _level then calling it from the Movie
loading I have found that the preloader may not appear until
a little later than you might want. I have yet to find a
definitive answer to this problem as you are dealing with
connection lag, bandwidth and other such issues.
Lets say you have this set-up:
A main movie "MainMovie" which loads a preloader into _level4 and calls it to chart the loading of itself ("MainMovie") The
you will need to ensure that the preloader is fully loaded
before "MainMovie" can call it's Properties. How affective this
is I think depends on the size of your preloader.swf and the
size of MainMovie. The following script Flash MX is what you
are looking at. There are two stages stage 1: load the preloader
2: check the "MainMovie" load.
MainMovie Frame 1:
stop();
//flag variable to switch from stage 1 to stage 2
currentStage=1;
//start Loading your preloader bar.
loadMovieNum("Bar.swf",4);
//set up your interval to call your loadCheck function
//every 100 milliseconds.
loaderInterval=setInterval(loadCheck,100);
//your load checking function
function loadCheck(){
//if current stage is stage 1 then check if the preloader is
//loaded.
if(currentStage==1)
{ //check if the Bar.swf is loaded
if(_level4.getBytesLoaded()>=_level4.getBytesLoade d() &&
_level4.getBytesLoaded()>0)
{ //Bar.swf is loaded and ready to set ..so we set it.
_level4.theBar._x=200;
_level4.theBar._y=200;
_level4.theBar._xscale=0;
_level4._visible=true;
//Bar.swf is loaded so we set flag variable currentStage
//to the next stage
currentStage=2;
}
}
else if{currentStage==2)
{ //now start checking the loading of this "MainMovie"
if(getBytesLoaded()>=getBytesTotal() && getBytesLoaded()>0)
{ //everything is loaded so make your preloader bar invisible
_level4._visible=false;
//start this "MainMovie"
gotoAndPlay(2);
//stop you load checking interval
clearInterval(loaderInterval);
}
}
}
This is one method but it's effectivness could only be
found out by testing on the web.
Milosav