Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Preloader For Multiple SWF's



HI,

I'm building a site with multiple SWF files. Each one having a preloader bar...

But when i re-call (not re-load) the swf's for a second time the preloader is still showing for 2 or so seconds...

I know it's picky, but is there a way of when the swf's are recalled to skip the preloader bar??

Just if anyone has any solutions, i'd be very grateful...

PM



FlashKit > Flash Help > Flash MX
Posted on: 09-15-2004, 10:57 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Complex Preloader - Load Multiple Movies W/ One Preloader
Hello to all!

I haven't asked a good question in quite a while so here's one.

I know how to create a general preloader fairly well. What I want to do is take it one step further.

I want a preloader with a status bar...but here's the caveat...I want it to load multiple external movies instead of just one. So it would load one after another and show the status of each.

I can't think of a site off the top of my head, but it would show loading and then it would load...say audio player...shows text "Loading Audio Player" and then shows loading progress...and then...image loader...shows text "Loading Image Loader" and then shows loading progress, etc.

You get the point.

Any takers?

Thanks.

One Preloader For Multiple Swf's
hi, i made this http://www.bodyflair.nl/test/loader3.fla preloader and now I want to load multiple movies that i'll be using throughout my site, so that visitors only wait once for all movies 2 load. And I want the preloader to show the progress. How do do this?

Multiple .swf Preloader
Ok so i have a website that will be utilizing multiple .swf's in pieces, now i want them all to be preloaded before anyone gets in so it wont be choppy, naturally. I could put them all in one but i havn't figured that out, and my site will use html as well as flash so i don't want the top frame to be loading while the bottom frame is already loaded.

What i'm looking for is a splash page that will preload all the elements of my homepage, and after it is loaded a link will pop up and goto my homepage which will have the .swf's loaded and ready to use.

Can anyone help me with this or is it impossible/too complicated?

Multiple Swf Preloader
Hi guys does any one have a multiple Swf Preloader, i need it asap i have to study in the inner structre of it.

Multiple Swf Preloader Help
Hi everyone,

I'm developing a flash movie wich is integrated by one main movie and three external swf. The main movie load the other three swf's with loadMovie function and i need to use one preloader -with a bar progress- to control the download of the externals swf's, but i'm having a problem, when i use the getBytesTotal() function for every movieclip instance -three empty movieclips for every external swf- in order to obtain the size of the swf i don't get the values, i'm just getting one size and then another or two sizes y then the last size. This is a big problem because the progress bar and the preloader never can get the size of the three external swf the first time the preloader run.

Anybody can help me with this?
Thanks in advanced for the help provided

Riflemex,

Multiple Preloader
Hi All,

Just wondering, is it possible to make a preloader that loads
multiple movies? For example...

I have a main movie that loads 3 external smaller movies into it
can I make a preloader that loads those movies
before the user actually clicks to load them into the main timeline?

Preloader in Main Movie

content 1 //////// 25%

content 2 ////////////////50%

content 3 /// 10%

any help is appreciated

Multiple SWF Preloader
I need to preload several swf's while a 'main.swf' is playing. This is for a CD project.

I have tried a couple different preloaders witn no luck. I would like the preloader to load the swf's in some order with someway to display which swf is loading and the progress of that swf.

The preloaders I tried would play the swf right after preloading it. I would like the swf to be preloaded and not play. Also, I would like the swf to not be visible after it is preloaded. I guess I could preload into a mc which I make invisible...

Any help on this would be greatly appreciated...

-john

Multiple Preloader?
Hello-
I have a thumbnail xml gallery I am building that is all actionscripted. I am not much of a programmer and am having trouble figuring this out. I load all my images in via xml, and dynamically assign and create the thumbnails. I use the "myMCL.loadClip" to load each thumbnail into its dynamically created holder. My question is this...I want to load ALL thumbnails first, then display them. Right now it just displays them as it loads. If I use "onLoadComplete", it only works after the first thumbnail loaded...not ALL of them. Any ideas on how to do this? Thanks in advance...

Multiple FLV Preloader
I´m sitting here with an interactive video application where I need to preload multiple Flash Video files. The first thing to do is preloading the first video file to be played then the rest. My idea is to put all the name of the files in an array and preload them one after one: when the first one is done the preloading of the next starts.

How can this be done in an good way? Is there another "better" way?

Multiple Swf Preloader
Hello
I am trying to make a multiple swf preloader.
I have to preload 40 swf files.


Please Help

Thank you

Multiple Swf Preloader?
Hi everyone,
is there an easy script to load multiple swfs with the preloader.
I've done some searching but everything seems so complicated. I just want the external swfs to preload so it doesn't take all day to load when it is called to the stage.
i thought this would be easy but it seems i thought wrong.
can anybody help me??
thanks guys

Multiple Preloader
Hey guys, i did a search on preloader didnt find the thing i want so here goes..

I have a main.swf which loads 6 other .swf , now at start im using main.swf to directly load all 6 .swf , i wanna create a preloader to display something like below

- Loading sequence -

About Us |||||||||| %15 completed
Portfolio ||||||||||||||||||||||||| %50 completed
Gallery |||| %5 completed
News |||||||||||||||||||||||||||||||||||||||||||||||||| 90% Completed

something like this, displaying all the loading sequence of all .swf at main.swf

Hope ya'll could direct me to a tutorial or examples

Thank you

Same Preloader For Multiple .swf's
Ok, heres the code I'm trying to use

ActionScript Code:
function checkLoad(target){    var lBytes = target.getBytesLoaded();    var tBytes = target.getBytesTotal();    var percentLoaded = Math.floor((lBytes/tBytes)*100);    loadbar._xscale = percentLoaded;        percentText = Math.floor(percentLoaded) + "% of " + Math.floor(tBytes/1024) + "KB loaded";        if(lBytes >= tBytes && tBytes > 0){        if(count>=12){            clearInterval(checkProgress);            loadbar._xscale = 0;            percentText = "finished, yo"        }        else{            count++;        }    }    updateAfterEvent();}


and for the on(press) I just call checkLoad() and pass the name of the .swf I'm loading. It seems to work for the first movie that I load, but not for any I load after that.

Here are my files:
http://web.ics.purdue.edu/~rstremke//multi_load2.zip

Theres a static preloader for all the movies; is that a pain, or should I just make a preloader in the beginning of each clip I load into the main movie?

Any help would be appreciated.

Multiple MC Preloader
Hi guys!

I need help. I have a Flash interface that (after a click of a button) loads 10-50 external movie clips into itself.
how can i create a general preloader for all of them?

I hope you guys can help me, and fast! thanks!


respectfully yours,

biggie

Help Please ***Multiple Preloader ***
What's the best way to preload lots of .swf?

I am using Flash MX.

I don't want to load into levels.

Multiple Preloader Q?
Greetings......

I have been fighting with this problem for the past couple of days.
Forgive me I am new to flash, and scoured the help forums for this problem.....

Here it is:

I am trying to get a preloader between scene 1 and scene 2
ie: scene loads, when a button gets pushed.. and bing..
preloader pops up and load scene 2.

Below is the script which I am using... instead of "_totalframes" I tried putting Scene 1 or Scene 2 depending on the scene... Once again thank you for your help!!!!!!!!!!!!!


if (_framesLoaded ==_totalframes) {
gotoAndPlay (3);
}

Multiple Movie Preloader
I am using a PC and it has terrible RAM allocation. I have a presentation that had to be created on 3 seperate FLA's because there is not enough RAM (I have a GIG) to work with all three parts on 1 file. I successfully got all three movies to play consecutively, but there is loading time in between each movie. Can anyone tell me how to create either a preloader or what the action script would be to make each SWF load while the previouse one is playing? Keep in mind that this is 3 consecutive SWF files. I'm basically trying to get rid of the gaps between them.

Multiple Movies & One Preloader
hi, i made this http://www.bodyflair.nl/test/loader3.fla preloader and now I want to load multiple movies that i'll be using throughout my site, so that visitors only wait once for all movies 2 load. And I want the preloader to show the progress. How do do this?

1 Preloader For Multiple Scenes
hi,

I'm trying to make a movie with an option to choose between the intro page or going directly to the website. I have 3 scenes :
1. opening page
2. intro
3. website
Is it possible to make one preloader on the opening page that will load either both scenes or else only the website? How can this best be done?

Thnx

Preloader With Multiple Scenes
I am having some trouble with my preloader since I added more scenes.
Is there anything in this tutorial I could change that would still check total kb loaded but also make sure last frame of last scene is loaded before it plays?

Now it loads scene 1 and about 30 or 40% of the movie and gets hung up in later scenes. This is the tutorial I used. http://www.flashkit.com/tutorials/Ac...89/index.shtml

Mark

Preloader With Multiple Scenes
I am having some trouble with my preloader since I added more scenes.
Is there anything in this tutorial I could change that would still check total kb loaded but also make sure last frame of last scene is loaded before it plays?

Now it loads scene 1 and about 30 or 40% of the movie and gets hung up in later scenes. This is the tutorial I used. http://www.flashkit.com/tutorials/Ac...89/index.shtml

Mark

One Preloader File For Multiple Swf
My problem is, In each swf file i have used preloader. and preloader is essential for each file. is there any technique to use one preloader file for multiple swf files. which will reduce disk space and time.

Multiple Scene Preloader
Can anyone please help/guide me in making a multiple scene preloader? I currently have a movie with 7 scenes. I would like a preloader at the beginning that will preaload all 7 scenes before it begins to play scene 1. Any help would greatly be appreciated.

Another Multiple SWF Preloader Problem
Hey Guys,

I wrote a letter to my Flash Developer friend, Noel Davey, asking him A Question about multiple preloading in Flash. He responded, but I don't know how to go about implementing the code for his suggestion. Can any of you kind folks out there give a clue? Here is how the correspondence went:

From Me:

... However, I'm working on a new project now, and I'm having the same problem(s) with the preloader.

See, the whole thing is...I'm using very small SWF MC created in Swish. For the text effects. My main file in this project is called intro.swf(approx 548KB). The first file you see online is called begin.swf(approx 10KB) which loads intro.swf on level 10.

Intro.swf loads the pitches (4 seperate SWF MCs) on levels 5,6,7, & 8 respectively, as well as the safety tips SWF file (approx 30KB) on level 3. They are all each approxiametly 14-20KB large. Relatively tiny files. I'm trying to load them below my main level (intro.swf), so the user can't see them.

By the time the preloader for intro.swf begins its supposed to call safety.swf on level 45, so it can be seen, and runs while the intro.swf is loading. Something for the viewer to see. However, this is not happening for some reason I don't know. No matter what level I try above 10, its not viewing. When I call each pitch.swf file on levels 11,12,13, & 14 respectively, their supposed to come up quickly without any hesitation, because they already were loaded at the beginning of intro.swf (level 10) previously. On the T1 connection at my job they show fine, but I'm not sure if the safety pitch is being seen.

Is there a way I can pre-load all the smalle swfs I need before or during I load intro.swf? This is my problem. Can you help me with that?

His Response was:

Hey Marc,

He is the way i think you can do it.this is the idea ok
You create a Movie Clip load in each swf one at a time and check for when the swf has completly loaded then load the next. Also this movie clip is to be made in visible. This sould buffer all the swf to the users computer and make your project run correctly.
And with the invisable Movie clip the user can not see them.

Hope that gives you an idea...

Regards,


Noel Davey

Preloader Multiple Swf Files
hello out there,

can anyone tell me how to build a preloader which
loads about 10 movies into one main movie at once.
i also need to show the loading process in with a
loading bar.
i tried this (if u ned a fla file just tell me!):

frame 1:
stop();
this.createEmptyMovieClip ("a", 1010);
this.createEmptyMovieClip ("b", 1005);
this.createEmptyMovieClip ("c", 1001);
this.createEmptyMovieClip ("d", 1004);


a.loadMovie ("a.swf", 1);
b.loadMovie ("b.swf", 2);
c.loadMovie ("c.swf", 3);
d.loadMovie ("d.swf", 4);
this.onEnterFrame = function(){
TotalBytes = a.getBytesTotal()
+b.getBytesTotal()
+c.getBytesTotal()
+d.getBytesTotal();
LoadedBytes = a.getBytesLoaded()
+b.getBytesLoaded()
+c.getBytesLoaded()
+d.getBytesLoaded();
Percent = Math.round(LoadedBytes/TotalBytes*100);
if (LoadedBytes != TotalBytes) {
_level0.progessbar.gotoAndStop (Percent);
}
//progessbar is a movie with 100 frames to show the progress..
if (loadedBytes == TotalBytes && LoadedBytes > 0) {
_level0.nextFrame();
}
}
frame 2:
stop();
loadMovieNum("a.swf", 1);
loadMovieNum("b.swf", 2);
loadMovieNum("c.swf", 3);
loadMovieNum("d.swf", 4);

Multiple Movies ONE Preloader
I currently have 8 movies that I have created for an online tutorial. Instead of having a preloader in each of the movies, I want to create one main movie that will load the subsequent movies before any of them will play. Therefore having the entire set of movies preloaded so the user will not experience any delays. I am not sure how to achieve this and have been fooling around with loading movies into levels. Can someone help in how to create this preloader??? and what needs to be done to the other movies??? I unserstand I need a stop in the other movies, but how do I play them once they are loaded.

Multiple Preloader Questions
Hi all, this one is for FLASH 5!

I am sure most of you can answer these q's but 4 some of us it is a mission. I WILL PLACE ALL THESE QUESTIONS AND MORE IN A TUTORIAL 4 BEGINERS ONCE MY PROJECT IS FIN AND I WILL GIVE CREDITS TO THOSE WHO HELP ME

I am creating a site but want most of the site contained in a single swf file and have some questions below...

1) I would like each scene to load only when there is a user action (like hitting a button), so that the scenes flow smoothly, how do i do this ???

2) I want different preloaders for every scene so that they match their topic, can i use different preloaders, if so how ???

3) My movie is 750px x 500px, how do i preload a scene or external
swf into an area on the stage ie. 200px x 200px ???

4) If the user would like to go back to a page/scene they've been before will it have to load it again ???

THANKS EVERYONE

P>O>O>O>
>R>T>C>L

Multiple Preloader Challenge
Hi,

I have an ecard that has two load two external .swf that contain audio. 1.swf and 2.swf

there are about 700 .swf audio files, so I have to use a text file using variables to sort out which is going to be used.

The ecard includes 4 scenes

1.) Preloader
2.) Ecard
3.) 1 (this is where I want to load 1.swf)
4.) 2 (this is where I want to load 2.swf)

The preloader is giving me problems because I cant load the 1.swf or the 2.swf.

these are the frames...

frame 1)
loadVariablesNum ("variables.txt", 0);

frame 2 frame is called preloader1start)
1text = 1;
loadMovie (1+".swf", loadtarget1);
wscale = bar._width /100;
totalbytes = -1;

frame3)
if (loadtarget1.getBytesTotal() == totalbytes) {
percentloaded = Math.floor(loadtarget1.getBytesLoaded() / totalbytes * 100);
pload = percentloaded ;
bar._width = "percentloaded * wscale";
if (percentloaded == 100) {
gotoAndPlay ("preloader2start");
}
}
totalbytes = loadtarget1.getBytesTotal();

frame4)
gotoAndPlay ("preloader1start");

frame5 frame is called preloader2start)
2text = 2;
loadMovie (2+".swf", loadtarget2);
wscale = bar._width /100;
totalbytes = -1;

frame5)
if (loadtarget2.getBytesTotal() ==totalbytes) {
percentloaded = Math.floor(loadtarget2.getBytesLoaded() / totalbytes * 100);
pload = percentloaded ;
bar._width = "percentloaded * wscale";
if (percentloaded == 100) {
gotoAndPlay ("preloaderloop");
}
}
totalbytes = loadtarget2.getBytesTotal();

frame6)
gotoAndPlay ("preloader2start");

frame7)
framesLoaded = _framesLoaded;
totalFrames = _totalFrames;
pload = Math.round((framesLoaded/totalFrames)*100);
bar._xscale = pload;

frame8)
if (framesLoaded==totalFrames) {
gotoAndPlay ("ecard", 1);
} else {
gotoAndPlay ("preloader loop");
}

************************************************** ***********
what happens is that it loads the first one but does not move onto frame5(preloaderstart2),

but strangely it still preloads the ecard...

so does anyone know how to move onto preloaderstart2?

************************************************** ***********

also the way I load the .swf may be a problem...although if I try to load it in scene 3, it works.

1text = 1;
loadMovie (1+".swf", loadtarget1);

so if anyone can tell me how to do this....it would really help

************************************************** **********

Thanks for reading this if not for your advice.

Preloader For Multiple Movies
I want to load multiple movies in stages or intervals (each user click loads a separate movie), and once all the movies are loaded, the final movie in the sequence will be loaded. This will all be run locally - not over the Net. The movies to check for status are loaded on level 2. What is the best way to do this? Would a preloader structure still be applicable? I am not sure how to do this w/ getBytesLoaded, the different levels, etc.

Any help would be greatly appreciated!
Abell1973

One Preloader With Multiple Files
Hello

Just wondering if its possible to have a preloader in a separate swf file and play it in the a main movie while another movie is loading. Blimey, did that make sence?

Let me try explaining again, with a structure:

--Main movie.swf
|--preloader.swf
|--section1.swf
|--section2.swf
|--section3.swf


Sections 1-3 will be loaded into the main movie (using Loadmovie). I would like to use the preloader.swf to play whilst the sections are loading, instead of having a preloader for each of the sections.

I hope that makes sence now.

Is it also possible to have a detailed preloader (ie with a progress bar) using that technique

Cheers

Neel

Multiple Movie Preloader
HELP! I am getting very confused on how to do this - I do not have much training in action script, and every example I have found on a preloader for a presentation with several seperate swf's has been different.
I have a main preloader scene, I want it to load my eight seperate swf files, and when the user presses "continue" to have the eight scenes run seamlessly together. I think I need to load these files into empty movie clips...I have tried but I have not had any luck.

Preloader / Multiple Swf In One Window
I am working on the flash project with a multiple sfw documents integrated in one graphic enviroment (just like multiple frames in HTML web site).

So the problem is: How can I make a preloader which can work for all swf documents in my site window?

Hope you got the point. For the better picture here's the link to that web site.

http://www.djkula.com/flash/flash.htm

PS - It's still working version.

PLEEZ HELP

One Preloader For Multiple Movies
Is it possible to use one preloader for simultaneously movie downloads within a flash file.....any tips on coding would be great...thanks so much......

Multiple Clips Using Same Preloader?
i'm working on a portfolio site and have lots of little "preview movie clips" that load on demand with buttons. previously i included a preloader into the preview clip itself, but the preloader won't show up til %80 done. so i need to use an external preloader.

BUT, to keep things simple, is there a way i can script my buttons to use the same external preloader to load each of the preview movie clips when a button is pushed? (in other words, Click button 1: preload.swf starts to load "preview1.swf" Click button 2: preload.swf starts to load "preview2.swf" , etc.)

thanks for any help.

1 Preloader For Multiple Swf's Question
Hello everybody.l'm building a website completely in flash, and l'm having a slight problem. l am wanting to use only one preloader to load all external swf files. i have studied a few sites such as 2advanced and webagentoo7 and they have seemed to develop their sites this way.

The pre loader is contained only in the main root movie which upon pressing a button it will activate and load the external swf file into an empty movie clip. This seems to be the way to go as the animation is much smoother than have a seperate preloader in all external swf's.Can anyone point me to a tutorial on how to do this or give me some help on the matter on how to achieve this.

Thanks in advance
l hope someone can help.

Multiple Loadmovies Using Same Preloader
hello flash kit community goodness
i am producing one main swf file
with multiple jpgs and swfs to be
loaded into the this main swf file
i have created a progress bar movie clip
inside the main swf file
it is a bar and percent loader
i want to use that same progress bar mc
when anything is being loaded into the main clip
im sure this is possible but
i am recent to webdesign and scripting
and the scripting im finding is mostly confusing
any help with understanding how to do this
would be greatly appreciated
bryan taylor robinson

Multiple LoadMovies & 1 Preloader For All?
ok..this is kind of a LONG scenario here..and is actually one of the ending parts of a LONG pet project of mine. Your general click button..load a part or image..click another button loads anohter part or image...and you build something (dress-up doll, shirt design, motorcycles, car mods..etc) type application.

basics:

I have an "application" that loads external.swfs into containerClips. Each button loads a matching external.swf. I have one "transition/preloader" animation/code that I have made modular so I can re-use same code/animation for all externally loaded .swfs. (logic behind it is: button starts the "transition animation" playing and sets a variable for WHAT .swf to load and a variable to WHERE the .swf should be loaded to.

(all containerClips are located inside a mainContainerClip..and each unique containerClip is on its own layer.)

Now.....I have it so when you build your "product"..you can save it. then gives you an ID number...and you can come back and view it or start building again...whatever.

This is the part where I am stuck. when I "load all the saved pieces back in..they load are being called all at once..... so I need a way for my transition/preloader to not only "fire/trigger" when I click my SAVED PROJECT button.."BUT" to NOT play the end of the transition/preloader (outro) until ALL the pieces have loaded.

Heres how I have my movie set up so far:

the button loads the piece: // (your only concerned with the "else" statements/code part..)

Code:
on (release) {
if (_root.frameVar == "loaded") {
_root.subNavContainer.loadMovie("frameOptions.swf");
}else {
//start transition & preloader clip(s)
_root.part = "frames.swf";
_root.indiPartContainer = "frameContainer";
_root.mainTransition_mc.gotoAndPlay("fadeIn");
_root.subNavContainer.loadMovie("frameOptions.swf");
}
_root.frameVar = "loaded";
trace("Frame Section: " +_root.frameVar);
}


this starts my transition animation playing...and a few frames in I have a STOP action...where I have a clip with this code on it:


Code:
onClipEvent (load) {
_root.mainContainer[_root.indiPartContainer].loadMovie(_root.part);
trace(_root.indiPartContainer);
trace(_root.part);
}

which takes the VARS set by the buttons..and loads the correct content into the correct containerClip.

INSIDE this clip....on the FIRST FRAME I have this code for my preloader:


Code:
this.onEnterFrame = function() {
tb = Math.round(eval("_root.mainContainer."+_root.indiPartContainer).getBytesTotal()/1024);
lb = Math.round(eval("_root.mainContainer."+_root.indiPartContainer).getBytesLoaded()/1024);
if (tb>0 && lb>0) {
_parent.gearsClip_mc.percent_txt.text = Math.round((lb/tb)*100)+"%";
//this.stop();
if (lb>=tb) {
_parent.gotoAndPlay("fadeOut");
}
}
}


now everythign works fine as is....and when I click on a one button to load one (1) piece at time..no problems...

its when I have to load multiple parts at the same time....

any ideas on how to approach this?

I posted before I started this project about this concern of mine..and the answer was..(sorta) do something like this in the preloader for checking totalBytes/loadedBytes (trying to adapt it to my scenario here)

Code:
_root.indiPartContainer = _root.mainContainer.container1+_root.mainContainer.container2+_root.mainContainercontainer3;
tb = Math.round(eval("_root.mainContainer."+_root.indiPartContainer).getBytesTotal()/1024);
lb = Math.round(eval("_root.mainContainer."+_root.indiPartContainer).getBytesLoaded()/1024);


open to suggestions...

I see problems with the:


Code:
onClipEvent (load) {
_root.mainContainer[_root.indiPartContainer].loadMovie(_root.part);
trace(_root.indiPartContainer);
trace(_root.part);
}


part..as "this" is what actually calls the "load" normally....

but when I load the "saved pieces" I do it from here (this snippet) of code. (the parts where the help is needed/should be focused is in "AS" tags....but all code is there...)


on (release) {
myTarget = idField_txt.text;
//myTarget = "testLoad";
savedParts = new LoadVars();
savedParts.onLoad = function(success) {
if (!success) {
idField_txt.htmlText = true;
idField_txt.htmlText = "NO SUCH ID#"
_root.loadedMode = "no";
trace("failed to load");
} else {
idField_txt.htmlText = true;
idField_txt.htmlText = "LOADING BUILD ID"
_root.loadedMode = "yes";
trace("load was good");

//Frame Array
var frameArray = [];
frameArray = savedParts.frameData.split(",");
/*
for (i=0; i<frameArray.length; i++) {
//trace(frameArray[i]);
}
*/
_root.savedFrameChoice = frameArray[0];
_root.savedFrame_x = frameArray[1];
_root.savedFrame_y = frameArray[2];
_root.savedFrame_xScale = frameArray[3];
_root.savedFrame_yScale = frameArray[4];
_root.savedFrame_currentFrame = frameArray[5];
_root.savedFrame_rotation = frameArray[6];
trace("Frame Choice: "+_root.savedFrameChoice);
trace("Frame x: "+_root.savedFrame_x);
trace("Frame y: "+_root.savedFrame_y);
trace("Frame xScale: "+_root.savedFrame_xScale);
trace("Frame yScale: "+_root.savedFrame_yScale);
trace("Frame currentFrame: "+_root.savedFrame_currentFrame);
trace("Frame rotation: "+_root.savedFrame_rotation); code:
if (_root.savedFrameChoice != "") {
trace(newline+"Re-Loading frames.swf"+newline);
_root.frameVar = "loaded"
_root.mainContainer.frameContainer.loadMovie("fram es.swf");
}

//Tank Array
var tankArray = [];
tankArray = savedParts.tankData.split(",");
/*
for (i=0; i<tankArray.length; i++) {
//trace(tankArray[i]);
}
*/
_root.savedTankChoice = tankArray[0];
_root.savedTank_x = tankArray[1];
_root.savedTank_y = tankArray[2];
_root.savedTank_xScale = tankArray[3];
_root.savedTank_yScale = tankArray[4];
_root.savedTank_currentFrame = tankArray[5];
_root.savedTank_rotation = tankArray[6];
trace("Tank Choice: "+_root.savedTankChoice);
trace("Tank x: "+_root.savedTank_x);
trace("Tank y: "+_root.savedTank_y);
trace("Tank xScale: "+_root.savedTank_xScale);
trace("Tank yScale: "+_root.savedTank_yScale);
trace("Tank currentFrame: "+_root.savedTank_currentFrame);
trace("Tank rotation: "+_root.savedTank_rotation);
code:
if (_root.savedTankChoice != "") {
trace(newline+"Re-Loading tanks.swf"+newline);
_root.frameVar = "loaded"
_root.mainContainer.tankContainer.loadMovie("tanks .swf");
}
if (_root.savedTankChoice != "") {
trace(newline+"Re-Loading tanks.swf"+newline);
_root.tankVar = "loaded"
_root.mainContainer.tankContainer.loadMovie("tanks .swf");
}

//Engine Array
var engineArray = [];
engineArray = savedParts.engineData.split(",");
/*
for (i=0; i<engineArray.length; i++) {
//trace(engineArray[i]);
}
*/

// etc..etc.. through ALL parts
}
};
//savedParts.load(myTarget+".txt");
savedParts.load("savedBuilds/"+myTarget+".txt");
}




so the question is...you now see how the multiple "re-loads" (if you will) are called. frames....then tanks....eangine..etc..etc al the way through...

how can I use my existing preloader code (and the way it is set up...transition in....preload check/wait...transition out.)

or will I have to make a complete new one? Looks like I might have too eh?..and if that is the only way..any suggestions..

(just take out the frame code in the (duplicate) preloader/transition clip(s) I have now...which does any "loading"...and lave the getBytes part?)


thanks.. I need another pair of eyes on this...Im going crazy! LOL





update:

I figured it out.....all resolved. I "cheated".. I duplicated my transition/preloader clip, instead of trying to use my current one (which was already a generic/reusable one for all the individual parts)...

and I edited my preload code to be similar to this:
code:
this.onEnterFrame = function() {
tb = Math.round(_root.mainContainer.frameContainer.getB ytesTotal()+_root.mainContainer.tankContainer.getB ytesTotal()/1024);
lb = Math.round(_root.mainContainer.frameContainer.getB ytesTotal()+_root.mainContainer.tankContainer.getB ytesLoaded()/1024);

if (tb>0 && lb>0) {
_parent.gearsClip_mc.percent_txt.text = Math.round((lb/tb)*100)+"%";
//this.stop();
if (lb>=tb) {
_parent.gotoAndPlay("fadeOut");
}
}
}


just in case anyone searches...this thread has a solution.

One Preloader For Multiple Scenes?
Hi, I'm a flash newbie trying to teach myself the joys of flash scripting. So, I thought I'd try to redesign my personal website using flash.

Things are going smoothly thus far, but I have a question:
My .fla file has multiple scenes that constitute the various pages. I was wondering, is there a way to set up a preloader in the main scene that checks if ALL the scenes within the flash movie are loaded (not just the home page)? I don't need anything fancy, just the basics.

If so, how would I go about doing it?

I know it must get tiring to repeatedly answer preloader based questions, but I'm not the sharpest tool in the shed, and some of the tutorials read like Greek.

Thanks for any help you can provide!

Multiple Jpgs Preloader
ok here's my problem
i have built a viewer for a number of jpgs. the jpgs are not embeded, they are loaded at runtime.

what i want to do:
i want each thumbnail to appear after the corresponding large jpg has been loaded into memory and be available for clicking.

the structure:
one empty MC for the large JPG
one small MC with another MC (invisible) and a button inside.

the small MC loads the large jpg inside it (in the invisble MC) and onEnterFrame checks to see how much of the jpg is loaded (using getbytesloaded). when done, it duplicates itself and this new copy does the same thing and so on (based on an array of files in the root frame)

the loading of the large jpg in the invisible MC is done so that the JPG will (hopefully!) be loaded into memory, and when i call it again (to be displayed in the large empty MC on stage), it will show right away.
if this is wrong, please correct me

Ive done this so people can start clicking on the thumbnails as soon as they're loaded (instead of having to wait for all the pictures).

The issue: while loading, if i click on a button inside a MC that already loaded its jpg, it takes a very long time to load the jpg. It seems it loads it again (not using the one in memory).

Does this make any sense?
Please help

One Preloader Bar For Multiple Files....
I've looked around like crazy to find sometning what http://www.flashlevel.com does on their site. One preloader for multiple files that shows the file beeing loaded and the progress in regards to the total of all the mutiple files beeing loaded. Does anyone no of a tutorial or code for this...

Thanks, Niklas

[F8] Preloader - Multiple Movies
I hate to do this, but none of the dozens of threads I looked at address this in the quite way I need.

I have a simple Flash movie where the main timeline as 10 or so layers. Each layer has one keyframe containing a different movie clip.

I have tried making a preloader as it's own movie clip and putting it in the top layer. The code for the preloader clip is this:

Code:
Frame 1
var tbytes:Number=_root.getBytesTotal();
var lbytes:Number=_root.getBytesLoaded();
var pct:Number=lbytes/tbytes;
loaderbar._width=Math.round(pct*200);

Frame 2
if(lbytes==tbytes) {
gotoAndPlay(3);
} else {
gotoAndPlay(1);
}

Frame 3
_root.opening.play();
stop();

When simulating a download, the preloader does not appear, and the movie does appear after it's fully downloaded.

I'm I approaching this preloader in the wrong way?

I don't want to use components (Loader, Progress Bar), as they always seem to cause the main movie to run slower.

Thanks,
- bob

Preloader For Multiple Clips
I undertstand how to develop a loading teaser and load an entire Flash movie but how do you just load individual clips when they are called upon? In other words, I put a loader in scene 1 of a Flash movie, let's say I have 5 page links each going to it's own movie clip when clicked. Each of the movie clips have identical preloaders. Problem is, when I add these clips to the timeline at various frames in scene 1, the entire movie loads when I test it instaed of just loading a clip when a page link containing that clip is clicked. Please help me understand how to make the clips only load when you click on their respective link. Thanks!!!

Preloader For Multiple Jpegs?
I have a project that is set up to load images from a server into set movie clips on the stage, then it proceeds to tween those through actionscript, sequentially (fading in, panning and then fading out into another, and then repeating the same process). Problem is, sometimes those tweens play out before all the images are able to load. So sometimes it plays through the tween without any image being able to be loaded into that specific movie clip, and you might end up finally seeing the image when the tween is half way over.

My question is: is there any way to preload all those images at once right at the beginning of the project? Or even just not allow it to go to the second frame (which is where the tween code is), until all the images have been loaded?
Ive been trying to figure this out for a couple hours here, and im just not seeing how i can do this. I thought i could just do:
loaded= clip1.getbytesloaded()+clip2.getbytesloaded()+...
total= clip1.getbytestotal()+clip2.getbytestotal()+...
and then just divide them like you normally would, but i cant seem to get that to work.
HoweverI have had sucess with that method when i use the "loadmovienum" function, in conjunction with the adding method:
loaded= _level1.getbytesloaded()+_level2.getbytesloaded()+ ...
total= _level1.getbytestotal()+_level2.getbytestotal()+.. .

Instead of "loadmovie", but i cant really do it the way i want, as with the loadmovienum function i have to load my images into a specific level, rather than a specific movie clip.

Preloader/xml/multiple Holders
I have came across many preloader examples and couldn't find one that will show how to construct a complex preloader that will calculate and preload multiple images and swfs that xml will load into various holders with different instance name (holder01, holder02, etc) at same time. Below's a rough preloader I came up for a single holder, so is it possible to adapt the script related to my question? If not, what is another approach I should look into?


Code:
this.onEnterFrame = function() {
holder01._alpha = 0;
var amount:Number = holder01.getBytesLoaded() / holder01.getBytesTotal() *100;
loader._xscale = amount;
percent = int ( (holder.getBytesLoaded()/holder01.getBytesTotal()) * 100 )
percentage.text = percent;
if(amount == 100) {
holder01._alpha = 100;
loader._visible = false;
percentage._visible = false;
}
}

Multiple Preloader - Loading Bar Bug
Hi

I'm almost 3 weeks trying to create a preloader that actually preloads some SWFs but with just one single bar.

I've searched this forum and I didn't find any post with something that really works with no bugs.

My preloader is working, but I get a bug in the loadbar, because for some reason Flash does not "know" how much "bytesTotal" I have for all SWFs...

Here is my preloader working online, you can see the bar going back at the end...
http://www.direttaweb.com.br/teste/

And here is the .fla
http://www.direttaweb.com.br/teste/load_swfs.fla

And here is my code

Thanks a lot!


Code:
// variables to hold getBytesTotal() of each SWF
_root.total_container_mc1 = 0;
_root.total_container_mc2 = 0;
_root.total_container_mc3 = 0;
_root.total_container_mc4 = 0;
_root.total_container_mc5 = 0;
// variable to hold getBytesTotal() of ALL SWF together
_root.total = 0;

//----------------------------------------

// variables to hold getBytesLoaded() of each SWF
_root.loaded_container_mc1 = 0;
_root.loaded_container_mc2 = 0;
_root.loaded_container_mc3 = 0;
_root.loaded_container_mc4 = 0;
_root.loaded_container_mc5 = 0;
// variable to hold getBytesLoaded() of ALL SWF together
_root.loaded = 0;

function onLoadStart(target){
// do nothing
}

function onLoadProgress(target, bytes_loaded, bytes_total){
target.stop();
if (_root["total_"+target._name] == 0){
// set bytesTotal of each SWF
_root["total_"+target._name] = bytes_total;
}
// set bytesLoaded of each SWF
_root["loaded_"+target._name] = bytes_loaded;

// set bytesLoaded of ALL SWF together
_root.loaded = _root.loaded_container_mc1 + _root.loaded_container_mc2 + _root.loaded_container_mc3 + _root.loaded_container_mc4 + _root.loaded_container_mc5;
// set bytesTotal of ALL SWF together
_root.total = _root.total_container_mc1 + _root.total_container_mc2 + _root.total_container_mc3 + _root.total_container_mc4 + _root.total_container_mc5;

_root.txt_loaded.text = _root.loaded;
_root.txt_total.text = _root.total;
_root.loadbar._xscale = (_root.loaded/_root.total)*100;
}

function onLoadComplete(target){
target.play();
}

function onLoadError(target, error_code){
preloader_mc.removeMovieClip();
txt_error.text = error_code;
}


// create movie clip loader to handle downloading
var loader_mc1 = new MovieClipLoader();
loader_mc1.addListener(this);

var loader_mc2 = new MovieClipLoader();
loader_mc2.addListener(this);

var loader_mc3 = new MovieClipLoader();
loader_mc3.addListener(this);

var loader_mc4 = new MovieClipLoader();
loader_mc4.addListener(this);

var loader_mc5 = new MovieClipLoader();
loader_mc5.addListener(this);

movie_btn.onPress = function(){
startPreload("1.swf",1);
startPreload("2.swf",2);
startPreload("3.swf",3);
startPreload("4.swf",4);
startPreload("5.swf",5);
}


function startPreload(url,num){
this["loader_mc"+num].loadClip(url, "container_mc"+num);
}

Preloader For Multiple External Swf's
I've been trying to make a preloader to load the root file and three external swf's onto separate levels. I want the preloader to indicate the progress of the total of all four files (i.e. it will reach 100% only when all four are fully loaded). I don't require a load bar, I just want text displaying the percent loaded.

I am new to ActionScript and have been experimenting with it. I've tried several different scripts from a number of websites and tutorials, and none of them seem to work, or they don't quite do what I want (they only load one file, or they load all files onto one level, or they have a separate progress indicator for each file, etc.).

The site can be previewed at http://www.seducinginternalneeds.com/test/CDBH02.html

It is not completed, but the first three links (Cold, Dead and Black) are linked to the external swf's. Right now the links work by calling the swf to be loaded, which causes a delay in the animation. What I would like to have is for each of these files to be preloaded onto a certain level, so that when a button is clicked it will simply say goto the appropriate level and frame.

Does anyone have a working script for this scenario?

Thanks for your time,

~ RaVeN

Preloader And Multiple SWFs
Hey guys,

I did some Flash work for my company here about a month ago. Some guys from a company upstairs helped us out with some graphics, and now we are returning the favor to them by helping them with their new website. Unfortunately my work didn't quite get to the level that they are looking for so I was hoping some of you could give me a kick in the right direction. Basically the site has a whole bunch of .swf files. For the main page there is a background with a few buttons at the top and a spinning graphic as the first swf , as well as a movieclip that plays a small video on the page as a second swf and finally some navigation with 4 buttons as a 3rd swf. Also, all the 'subsites' are .swfs as well... this is what they are asking...


They want a single preloader for the main page, that is, preload the 3 .swfs i mentionned with a single preloader 'image'. They then want, once the main page is loaded, for the 'subsites' to begin preloading in the background (which I think this: http://proto.layer51.com/d.aspx?f=741 should work fine for).

So if anyone can help me with the first part and maybe tell me "that will or will not work" for the second it would be a great help.

Thanks a ton,

--D

Preloader On Multiple Movieclips
thanks in advance -

Okay, simply put i have about 10 different maps which depending on which ones load, activate waypoints. ( anywhere from 4 - 130 ) when the user selects a waypoint, it loads a series of 12 images representing the waypoint pressed into a grid of 12 blank movieclips.

the code for that :


Code:
function changeimagegrid() {
if (currentButton>=1 && currentButton<=(numberhotspots)) {
for (var i:Number = (((currentButton-1)*12)+1); i<((currentButton*12)+1); i++) {
mcsimplified = ((i+1)-(((currentButton-1)*12)+1));
var imagetoload:String = "neighborhood_images/"+HSsection+"/"+HSsection+"_nail/"+i+".jpg";
var mcloadto = eval("_root.image_grid.imagegrid_holder.imagethumb_"+mcsimplified);
loadMovie(imagetoload, mcloadto);
}
}
so i have all this working but i want to have each image have a preloader wipe across each Movieclip while they load, and then dissapear on complete.

i know i must need to use a moviecliploader, a load listener, and just declare a startload function, but ive only done it in the past with a single movie clip loading into levels.

like this- how ive done in past


Code:
mcLoader = new MovieClipLoader();

loadListener = new Object();
mcLoader.addListener(loadListener);
_root.percentText_txt._visible = false;
_root.progressBar_mc._visible = false;
loadListener.onLoadStart = function() {
_level5.stop();
};
loadListener.onLoadProgress = function(loadTarget, loadedBytes, totalBytes) {
preloaded = Math.round(loadedBytes/totalBytes*100);
_root.percentText_txt.text = preloaded+"% loaded";
_root.progressBar_mc._xscale = preloaded;
};
loadListener.onLoadInit = function() {
_root.percentText_txt._visible = false;
_root.progressBar_mc._visible = false;
_level5.play();
};
function startLoad() {
_root.percentText_txt._visible = true;
_root.progressBar_mc._visible = true;
_root.progressBar_mc._xscale = 1;
}
can anyone give me a hand with this? - some reason i just cant seem to get it to work.

thanks

Multiple MC Preloader Problem?
Hey guys

I'm having trouble making a Sequencial or Multiple Preloader.

Hope it is not too complicated to understand. I have managed to fry my brain so far.

Can anyone help me figure out how to make this work?

http://www.dicksoncreativedesigns.co...ePreloader.zip

I need it to be like this example below however can not figure out how to make the percentage txt a load bar....

http://www.dicksoncreativedesigns.com/temp/Multi.zip

Copyright © 2005-08 www.BigResource.com, All rights reserved