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




Loading Multiple Swfs In A Container



Hello GuysComing from a java background,I am struckwith flex/actionscript probs.My requirement is pretty simple for actionscript developers But i dont know how to start.I need to have multiply swfs in a master container.I wish to know what the child swfs should extend.How can i resize the child swfs in the master container.please suggest.



KirupaForum > Flash > ActionScript 3.0
Posted on: 06-28-2008, 04:09 AM


View Complete Forum Thread with Replies

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

Loading Swfs Into A Container
I am trying to load various swf into one container (instancename:holder).

In As2 i used to declare a variable, change its properties via buttons and load the swf using the MovieLoaderClass into the holder clip.

what is cool about this is the fact that when you load a different movie or a website category, firstly the exisiting movie exits and then the new is loaded which leads to smooth transitions.

i used the MovieLoaderClass heavily which doesn't work in AS3.

loading a swf in AS3 is straight forward but cannot seem to get my head around loading swf via a variable

Loading Next And Previous SWFs Into A SWF Container
Hi

I have up until now been using scenes or very large single swf file for movies, however I have been looking at using the unload swf function but to say I am a little confused is an under statment... Prehaps if I state my needs someone could give me some help or point me to a helpful tutorial or example that has already been done!!...

I have a top level SWF that has a graphical 'TV' Screen and two buttons, Next and Previous. I have 9 other swf files that need loading in 3 ways:

1. Automatic .. First plays then when end of swf1 is reached then swf2 plays.. so on and so on..

2. Press the Next button which loads in the 'next' swf

3. Previous Button that loads the 'previous' swf..

I have found a couple of examples that do bits of this but Im sure there must be something out there that hits everything and probably stuff I havent thought of...

Any help much apprieciated..

Steve

Loading Swfs In To Container Within Master Swf
I am having a problem loading an swf into a movie that itself is loaded into a master swf.

In other words I have a map (called "downtown.swf") of a town that when you click on a building, another swf ("rosettas.swf") containing address information is loaded into a container using:

but1.onPress = function () {
_root.createEmptyMovieClip("container",1);
loadMovie("rosettas.swf","container");
container._x = 1250 ;
container._y = 850 ;
}

that works.

However, I downloaded a zoomable map ("zoom.swf") which loads the downtown.swf into a container itself and then allow you to zoom in and out of the map. When I click on the building in downtown.swf (which has been loaded into zoom.swf and it iturn into "test.html") the button is active but rosettas.swf does not load, or if it does then it is in the wrong level, so cannot be seen.

I know this is a question of paths and levels so I put all the files in the same folder to eliminate any strange path issues. Still Nothing.

I realise that the _root call in the code in downtown.swf which I pasted in to this thread is no longer root, since it has been loaded into zoom.swf.

Does anybody have a clue as to a solution? I am willing to send files to somebody who could help me.

By the way "zoom.swf" also has this line of code in it

containerForZoom._lockroot = true;

Thanks in Advance.

Loading Swfs With Custom Classes Into A Container (MX)
Hi all,

I've got built myself a movie which contains the Class "square", which is a movieclip that has several prototype definitions.
On it's own, this works just fine (you can see it here http://www.s-j-t.co.uk/flashkit/squares.swf), however when i load this swf into another container movie, all stops working and the clips that are scattered over the stage normally, don't get defined.

I've checked through and set all the variables and functions to be defined within the swf (.i.e. paths are with _root), so in theory it's self-contained but this doesn't seem to make a difference.
I've got a feeling this is about variable scope...or maybe cross definitions of function and variable names...
Any pointers on where to start debugging this would be a massive help...

cheers!

Loading External Swfs Into A Sized Container
I am wondering how I should load the external swfs into the centre stage w/o loading the whole movies. I understand a bit abt using the container to fetech the external swfs for download. However I am not sure how to make the external swfs download into the sized container.
You can take a look at my illustration diagram so that you can understand what I mean.

I appreciate it if you can give me some advice. Thanks!

Loading Multple External .swfs Into One Main Container
I have a home page that calls one main .swf file. And within this container, it calls 5 other .swf files. The problem is that when the page is loaded, not all .swf files show up. Sometimes 1 will not load, sometimes 2 will not load, sometimes they all load and sometimes none of them load. There is no pattern as it varies each time the page is loaded. Is there some sort of limitation to what .swf files can load. Any help would be greatly appreciated.

Loading Multiple MCs Into A Container
I have a question more about logic: I'm working on a site for myself and I want to create an interface similar to the one on egomedia.com

The main problem I'm having is figuring out the logic behind having a navigation system that knows when certain states of the site are true or false.

For instance on egomedia.com when a visitor first enters the site and selects a navigation button a new window appears with a little animation zip, then the requested content loads. As the viewer selects different navigation items the content window loads in the external swfs. as needed.

The thing is the Content window has additional states for open, closed and opening and closing transitions. So, how does the Flash Navigation Bar check to see which state the Content window is in when the user selects a button.

Another words, If I select profile and the Content Window opens with a little anim then I select Careers I don't want the window to reopen with the anim I just want it to load the external content.

Any help is appreciated - I'm just trying to figure out the logic here. BTW nice job egomedia.com -- you've stumped me.

Thanks, Todd

Loading Multiple Jpg's Into One Container With Loop
Hi, here is my situation. I have multiple thumbnails and when you click on one thumbnail I want the larger image to externally load into a container. When you click on another thumbnail I want the current large image to fade out and the new image externally load in. Now I can handle this, but I am trying to make everything easier by not reproducing the same loadMovie code over and over again for every thumbnail.

I assume I do this by using some sort of loop and vars, but this is pushing my abilities of Action Script. Can anyone point me to a good tutorial, that is easy to follow and understand for a new Action Script sort of person?? I have searched and can't find anything I can follow and understand very well....thank you very much!

steve.

Loading Multiple Swfs And Xmls Started Before Finished Loading
Hi,

I have a encounter a problem regarding loading of the swfs and xmls files.
A preloader is done for these items. However it started playing before everything (swfs and xmls files) is loaded.

I have an array to contains all the files to be loaded. Using this array, i checked and see if the items are all loaded. If loaded, they will jump to the ready frame.

Anyone have any idea what is wrong??

Thanks.

Loading Multiple .swfs
Hi gang-

I am loading multiple .swf files but using one preload function to do this. How can I determine the size of say 3 of these movies and then once that bytetotal has been loaded have my main movie play while the other movies are still loading?

I need my preloader to move a bar to show the progress and I can do it if I am checking only one file loading but I am at odds trying to figure out multiple downloaded files.

Is it possible to just get the size of the three files and then add them up? If so how do I do this?

Thanks in advance.

Loading Multiple SWFs
I have several small "title" swf files, that load into my main movie. It's an all flash site, with 6 sections - "entertainment", "leisure", "motor sports", "events", "media" & "promotions".

When the user clicks the relevant links, various movies will load into various MCholders placed on the stage. One of these is a MCholder for the title - the 6 title swf's are only 1 or 2KB. During testing I noticed that there is a slight delay between the user's click, and the display of the title, is there any way to load these little SWF files when the page first loads to get rid of this delay?

In case you're unclear:

http://www.geccogroup.com/flash/layout.html

S.

Loading Multiple Swfs
I am having trouble loading multiple swfs. I split up a very large swf into 4 smaller ones and created a loader movie to load these smaller swfs.

I have 4 empty movie clips in the loader movie each on a separate layer to hold each smaller swf. The loader will load swf1 into target1, swf2 into target2, etc. Each empty (target) movie clip has code to check when it is finished loading as follows:

onClipEvent(data) { if this.getBytesLoaded()>=this.getBytesTotal() { _root.loader.clipLoaded(this);}

When the clipLoaded() function is called, the loader checks if there are other movies to load, if so, it will load the next swf into the next target.

As a clip is loading, the loader will check if its the "current" clip that I want to play (all 4 clips play back to back). If the "current" clip has more than 2 frames loaded, I tell it to gotoAndPlay(2). Once the current clip finishes, I check the next and so forth.

My problem: This scheme works fine for 2 clips. When loading a third clip, the current playing movie (swf1 in my tests) gets "blown away" somehow (stops playing) and the loader proceeds to re-load it again. It then re-loads clip 2 and then 3 and then finally stops when all 4 clips have been loaded.

Thus, I cannot play a clip while I am loading others in the background (again it works fine for 2 clips but not more than 2). I've gone over my code numerous times and can't find any bugs. The loading schemes works perfectly fine when running off the local disk, but, fails when running over the internet. Is there a problem playing clips and loading clips simultaneously?

PS: (I know this is long winded, but, I wanted to give as clear a picture as I could). Thanks in advance for any replies.

Pre-loading Multiple SWFs...
Hi there

I am wondering, I have a mainsite.swf that simply has two lines of Actionscript:

loadMovie("filmgrain.swf",10);
loadMovie("picstrip.swf",5);

Problem is, I'm not sure the best way to pre-load them so they start together...

You can see what I've done, without pre-loader, at www.thelastpictureshow.net

Any advice welcome!

Loading Multiple Swfs
Hello,
I'm having a problem navigating through multiple swfs in a player. The break down of the project is as follows....

One SWF that acts as a player. The player contains a navigation that allows you to load different swf's into a container MC.

This part works fine.

Each swf that I am using has a forward and back button so I can go from label to label within the swf. The problem I'm having is telling one swf to load a different swf into the player's container MC. The code I have tried using is..


Code:
on (release) {
_root.container.loadMovie("part1.swf");
}



Could anyone show me the correct way to do this?

[CS3] Loading Multiple Swfs
hi there

i have 3 files... called

flags.fla - contains 2 movieclip buttons (german flag(instance=deClick and an english flag(instance=enClick)

welcome.fla - is a greeting in english

welcome_de.fla - is a greeting in german!!

in the flags.fla file, in the first frame of the actions layer i have experimented by putting lots of different combinations of code ive found from the internet... none to my joy...

how do i link flags.fla to either welcome.fla or welcome_de.fla depending on which flag is selected?

so far in the first frame of the flags.fla i have

Code:
deFlag.addEventListener(MouseEvent.CLICK, deClicks);
enFlag.addEventListener(MouseEvent.CLICK, enClicks);

function deClicks(e:MouseEvent):void
{

}


function enClicks(e:MouseEvent):void
{

}
is this correct and what should go in the function's brackets if it is?

i have been searching for a long time now.. i almost feel ready to give up!!
please help if you can

Loading Multiple Swfs
I need a separate swf file to act as a preloader for multiple swfs. The key though is that the preloader would load an external swf, that swf would run through its timeline and when it reached the last frame, load another swf. That swf would run through its timeline and then load another swf; continually looping.

Right now I have the external preloader, but I'm only using it to l load one file.

Thanks

Loading Multiple Swfs?
Just completed a site but realized how annoying it is that each individual swf file has to load... is there a way to make all 7 external swf files load in the beginning? or is there a way to make them load while people are viewing the first page?
heres a link to what it is now:
http://www.josephscohen.com/fo

thanks guys* Joe aka teamred

Loading Multiple Swfs
I have a animation that I want to use as an introduction to a web site, but it is currently running at an swf file size of over 7MB.  I could divide the animation into smaller swf's of about 1MB each, just wondering if I could then get each swf to play and call the next one in the order that I set.  Would a simple piece of actionscript do this for me.

Any solutions would be appreciated !

Thanks in advance

Loading Multiple SWFs For A Video
Hello,

I have created a training video and broken up the 60 minute movie in to 2-4 minute segments. Each segment is named Training1.swf, Training2.swf, etc.

I now need to create a "controller" SWF that will load the first SWF, and start playing it ASAP. On broadband, this seems to play instantaneously. It would be nice to have VCR controls on it also.

Can I start to load the next SWF while the current SWF is playing? How?

On broadband, I expect the next SWF to start playing... however for modem clients, I would like a 'loading...' preloader between each SWF. Can this be done?

-Tim

Loading Multiple Swfs Problem...
i'm having a small problem with loading multiple swfs...okay i have my site setup to where the site loads, then it loads a separate swf for the main content window and each page of the site that loads in that window. all that loads fine, but on my portfolio page i have a new swf open up for every item in my portfolio....everything loads fine when i view the portfolio.swf by itself, but when it loads in the main site swf none of my items show up. any ideas? do i need to have it load in another level or something?

Loading Multiple Swfs At The Same Time
I created a webpage in four segments that are meant to begin to animate at the same time. Depending on if they load simulataneously or not will throw off the animation. I was wondering if it's possible to get all four to wait for the last one to load or if I should just combine them into one big swf. If I should just combine em what's the least cumbersome way to do so? Thanks!

Jeff

Queueing The Loading Of Multiple Swfs
which approach would be reccomended in this circumstance:

i have x swfs that are sections of the parent movie. i want to load them all whilst the viewer is reading the splash etc. if they choose a section, then that section should be the priority for loading... but when loaded the others continuing caching.

in windows, there is a default max number of 2 simulateous files that can be loaded, no?

would it be advisable to have an array that was being stepped thru, one at a time, then have a parrellel request for the selected section.

cheers

also posted in flash 8 forum

Loading Multiple External Swfs Into
I made an animation a while back that i separated into 5 different .swf's. My question is, how can i make it so they load into a single swf, but have it so the second scene starts right after the first ends, and so on. Also, is it possible to load them all before the movie would start, so that once the first scene ends, the viewer doesnt have to wait for the second to load up and so on? Thanks.

Loading Multiple Swfs In Master Swf
HI Frendz

Coming from a java background,I am struckwith flex/actionscript probs.My requirement is pretty simple for actionscript developers But i dont know how to start.I need to have multiply swfs in a master container.I wish what the child swfs should extend.How cani resize the child swfs in the master container.please suggest.

Loading And Inserting Multiple Mc's Or .swfs
Hello everyone. I have a question that I think can be answered very easily, I just can't figure it out. Ok, I am trying to load and insert 4 seperate mc's, or swf.s (whatever you guys say is easier) into a main movie that has my main navigation. I understand the loadmovienum command but if I put a loadmovienum command on my main timeline will it prelaod all my movies and wait to spawn them when I tell it to? Also if all 4 load and you click on one, do all the others unload? Finally after somone tells me how to properly do that...How do you insert them into your main movie without it unloading the main movie? Basically I want the 4 movies to play on top of the main movie, but I want them to either have a preloader, or be loaded through the timeline and waiting for the user to click them. Then when the user clicks on them I want the movie to play, while still having the background there. (The background serves as the main navigation with all the buttons and such. Here's a good example www.4cognition.com/v2.html see how the main movie slides in, then 4-5 seperate movies play all that are linked to another mc or .swf file and the process is continued in those linked files! Confused? I am...

Flash App Loading Multiple Swfs
Hi ...

I am having to fix a load problem with our Flash app. The current code loads in 3 to 4 swf's (100 to 300 kb in size) into the main swf and the same time. Should the swfs be loaded sequentially or is ok for them to be loaded all at once?

Thx

Loading Multiple Swfs ... Help Confused
i tried to do a search of what i want. when i clicked search it gave me an empty pages

so i thought iw ould make a thread

I have two swfs

i dont want buttons but i am confused..
the one movie plays for like 15 frames, and the rest plays for 45 frams

I use the loadmovie function to load the first one .. test.swf .. and then i use the unloadmovie fuction to unload the movie and then i use the load movie function to load the new one but it wont load it.. it just keeps looping the first one

i dotn want buttons or anything i just want when the firstmovie is done playing to load the second one right away

so in summary

two files test.swf and test1.swf
i want basically to laod both movies .. but one plays first and then the next one

Loading Multiple External SWFs
Hello -

I'm trying to from one button go to a specifc frame and stop and load 3 external SWF files on three seperate layers (since parts of them need to be in front or behind the others). So far I've been able to go to the specific frame and stop, and load 1 of the 3 movies. But, whenever I try and load the 2nd or third movie it doesn't work. Below is the code I am using and the result that it gives.

The following code goes to frame 65 and stops and then loads "4thfloor.swf". "Menu.swf" does not load.


Code:
on (release) {

gotoAndStop(65);

createEmptyMovieClip("menu_holder", 1);
menu_holder._x = 0;
menu_holder._y = 0;
menu_holder.loadMovie("menu.swf");

createEmptyMovieClip("menu_holder2", 2);
menu_holder._x = 0;
menu_holder._y = 0;
menu_holder.loadMovie("4thfloor.swf");


}
This code goes to frame "65" and stops and successfully loads "menu.swf".


Code:
on (release) {

gotoAndStop(65);

createEmptyMovieClip("menu_holder", 1);
menu_holder._x = 0;
menu_holder._y = 0;
menu_holder.loadMovie("menu.swf");


}
I've yet to try and add script to load the 3rd movie since I've been unable to successfully load 2 at the same time. Any help is greatly appreciated!

-Jason

AS3.0 - Loading/Unloading Multiple Swfs
Hello,

Sorry for posting this message twice - I hadn't seen that you had a specific forum dedicated to AS3 scripting when I posted initially to the Flash CS3 general forum. I should have looked closer.

I've finished Kirupa's great tutorial on loading an external image into flash using AS3. I have to say that this is the clearest and most useful set of instructions on how to do so that I've come across over four days of searching! As simple as it might be for many of you, the initial instructions on how to create the empty movie clip container are especially appreciated!

Now, I'm wondering how to extend this concept one step further. I have a single flash CS3 file into which I'd like to load and play at different times as the main movie plays different swf files. My goal is creating a presentation that will be displayed on a large TV at a conference, that will run without user input (no buttons). Essentially I'm creating a "flashier" powerpoint presentation.

1. At different times in the main movie's timeline, how can I use AS3 to call different swfs for playback? I'd need to somehow unload previously played swfs, wouldn't I? What code addition to Kirupa's tutorial would accomplish this?

2. Would I somehow have to read the individual swfs into some sort of array, somehow?

3. Would all of this be accomplishe by a single script placed on a single frame of the main movie's timeline?

Thanks in advance for any help!

Here's the script from Kirupa's tutorial as provided on www.kirupa.com:


var imageLoader:Loader;

function loadImage(url:String):void {

// Set properties on my Loader object
imageLoader = new Loader();
imageLoader.load(new URLRequest(url));
imageLoader.contentLoaderInfo.addEventListener(Pro gressEvent.PROGRESS, imageLoading);
imageLoader.contentLoaderInfo.addEventListener(Eve nt.COMPLETE, imageLoaded);

}
loadImage("pixelHouses.jpg");

function imageLoaded(e:Event):void {

// Load Image
imageArea.addChild(imageLoader);

}

function imageLoading(erogressEvent):void {

// Use it to get current download progress
// Hint: You could tie the values to a preloader

}

Loading Multiple Swfs ... Help Confused
i tried to do a search of what i want. when i clicked search it gave me an empty pages

so i thought iw ould make a thread

I have two swfs

i dont want buttons but i am confused..
the one movie plays for like 15 frames, and the rest plays for 45 frams

I use the loadmovie function to load the first one .. test.swf .. and then i use the unloadmovie fuction to unload the movie and then i use the load movie function to load the new one but it wont load it.. it just keeps looping the first one

i dotn want buttons or anything i just want when the firstmovie is done playing to load the second one right away

so in summary

two files test.swf and test1.swf
i want basically to laod both movies .. but one plays first and then the next one

Loading Multiple External SWFs
Hello -

I'm trying to from one button go to a specifc frame and stop and load 3 external SWF files on three seperate layers (since parts of them need to be in front or behind the others). So far I've been able to go to the specific frame and stop, and load 1 of the 3 movies. But, whenever I try and load the 2nd or third movie it doesn't work. Below is the code I am using and the result that it gives.

The following code goes to frame 65 and stops and then loads "4thfloor.swf". "Menu.swf" does not load.


Code:
on (release) {

gotoAndStop(65);

createEmptyMovieClip("menu_holder", 1);
menu_holder._x = 0;
menu_holder._y = 0;
menu_holder.loadMovie("menu.swf");

createEmptyMovieClip("menu_holder2", 2);
menu_holder._x = 0;
menu_holder._y = 0;
menu_holder.loadMovie("4thfloor.swf");


}
This code goes to frame "65" and stops and successfully loads "menu.swf".


Code:
on (release) {

gotoAndStop(65);

createEmptyMovieClip("menu_holder", 1);
menu_holder._x = 0;
menu_holder._y = 0;
menu_holder.loadMovie("menu.swf");


}
I've yet to try and add script to load the 3rd movie since I've been unable to successfully load 2 at the same time. Any help is greatly appreciated!

-Jason

Loading Multiple Swfs To Cache
I have the following code below:


Code:
myMovies = new Array("car_sales.swf", "community.swf", "food.swf");
var x = 0;

// Create a MovieClipLoader object instance and a standard listener
var mcl:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();

// STEP 2: Spell out what you want to happen with given MovieClipLoader events,
// and assign that to the Listener object.
myListener.onLoadStart = function(container_mc:MovieClip) { // This will trace out when the MC starts to load
trace("------------ START -------------");
trace("Your load has begun on movie clip = "+container_mc);
};
myListener.onLoadComplete = function(target_mc) { // This will trace out when the MC is done loading
trace("------------ COMPLETE -------------");
container_mc.setMask(mask_mc);

target_mc.onEnterFrame = function(){
//trace('checking this frame');
if(this.isStopped == 1){
trace('clip is done');
mcl.unloadClip(container_mc);
x++;
if (x == myMovies.length )
{
x = 0;
}
mcl.loadClip(myMovies[x], container_mc);
}

}
};

// STEP 3: Register "myListener" with the MovieClipLoader object
mcl.addListener(myListener);

// load clip into container
mcl.loadClip(myMovies[x],container_mc);

It will automatically play all the swfs in a constant loop.. what i want to do is make sure they don;t have to load them up each time..

so one way i thought of doign it was loading the next clip while the current one is playing but not having it start playing until the current one is done..

anyone be able to point me in the right dirrection?

Can i load a swf with out playing it.. like nextclip.stop() or something?

Problem Background Loading Multiple Swfs
I have been working on a project where I background load ~50 separate swf files from a main swf so that when the user navigates to the next page (each page is a separate swf) in the sequence, the file is already loaded and ready to go. In case that it is not fully loaded I have a preloader showing the progress on that page (file). The problem I am having is that Flash will not wait for one file to fully download before downloading the next. It seems that it is downloading 3 at a time. Some files are larger than others which results in some pages further along in my sequence to load before previous ones. This becomes a real issue when the user has a slow connection.

MY QUESTION is this: does anyone out there know how Flash handles this and if/how it can be controlled.

Here is the code (some of which has been copied from other posts):
//background loading
var n = _root._totalframes-2;
var mc;
for(var i = 0; i < n; i++) {
// we have to use different depths, or the last one will knock
// out the previous one
mc = _root.createEmptyMovieClip("movie" + i, i);

// now, in this time through the loop, mc is the new movie clip
mc._x = 0;
mc._y = 102;
mc.loadMovie("oronite-scrollText-" + i + ".swf");
}
nextFrame();


I have a MC that controls the preloader on each page.

Loading Multiple SWFs From A Master Movie.
Hi,

I have numerous SWF movies that I am loading & unloading using the loadMovieNum and unloadMovieNum script.

I can successfully navigate between SWFs, but wanted to go one step further:

For navigating between movies, is there any way to specify which SCENE to go to within the swf you are loading?

If this cannot be done with loadMovieNum, is there another script that lets you navigate to a specified scene within an swf that you want loaded?

Thanks.

Loading Multiple Swfs With Embedded Fonts
I've just been told split up the different sections of a movie I've been making into different swf and to load them into a main movie. This is because apparently it would be too big a load if it's all together.
Because of all of the multiple embedded fonts what I've ended up with was 3 100k files instead of 1 160k file. The guy who told me to do it assured me that I shouldn't worry and that it would only load the fonts once, ignoring them in the subsequent movies, and that this would make the loads smaller.

I've never heard anything about this before, but I haven't tested it, and in an ideal word it would happen. Is this true?

Preloader For Loading Multiple External Swfs
I'm working on a project where I have a main "container" swf which is loading in multiple external swfs. My challenge has been to create a preloader that tracks the loading progress of the separately loading swfs and presents those separate progresses as one single progress for everything. So here's the solution I came up with. I'm hoping anyone who is interested can take a look and give me your thoughts, good or bad, on this approach.

First, I'm loading the external swfs by looping through an xml document which contains the path info for the swfs. For each external swf in the xml document, I'm creating a new MovieClipLoader and a new listener Object. I'm loading the external swf using the loadClip method of MovieClipLoader and then using the onLoadProgress method of the listener Object to get the bytesTotal for each swf and adding them up to get the "total bytes" for all of the swfs. I'm also getting the bytesLoaded amount in the onLoadProgress method and using that to keep track of the progress of each swf.

Then, I created a function, which runs onEnterFrame, which takes the bytesLoaded for each swf and adds them up to get a "total bytes loaded" for all of the swfs. I then compare the "total bytes loaded" to the "total bytes" (which I set in the paragraph above) and displays the progress for all of the swfs as one value.

I'll refrain from pasting any code for now and wait to see how clear or unclear the description of what I'm doing is. Feel free to comment if you've had experience doing something like this in the past or if you can see a better way of doing this.

Thanks!

Loading Multiple SWFs From Alternative Paths
I have a list of 9 SWF file names. Each one could be in one of three file paths. For each SWF, I must search the three file paths in a specific order. I need to display all 9 SWFs on the stage at the same time (like thumbnails).

I don't need to worry too much about loading progress, but I need to be able to tell that I could not load the SWF from one folder, so should try the next folder.

I have been trying to use MovieClipLoader with a listener for errors. When the error handler is called I try the next folder. However this seems rather clumsy and I cannot get it to work in a loop to cycle through all 9 SWFs.

Can anyone give some hints for an elegant way to do this? E.g. should I use the a bunch of instances of the Loader component? Is there a simple synchronous version of loadMovie that would return a "file not found" error?

Thanks!

Loading Multiple Swfs Into One Html...help Senoc
hey all,
senocular gave me a GREAT answer to this question i had of how to load multiple jps into one html page as a popup window...now i want to load multiple swfs with quicktimes imbeded into one html page...i tryed using the same method but it doesnt give me the swfs, rather just a blank window....what change do i have to make in the code or html page....

here is the thread with the original question:
http://kirupaforum.com/showthread.php?threadid=13881

here is the answer from SENOCULAR
http://www.umbc.edu/interactive/fla/openImage.zip

thanks senoc for all the help and any more would be greatly appreciated as usual

thanks to all
peace
Pith

Slideshow + Transitions Loading Multiple SWFs
So I went through the wonderful slideshow/gallery tutrorial on this site.

And I used a version of the loading mutliple SWFs with transition tutorial.

They work fine separately. And they even work together some times. But for somereason when I call to load the slide show it want to use the wrong transition from the main timeline.

Here is the link to the site. Click on STYLISTS in the nav. If you have done the tutorial the transition uses a alpha fade. That is what I want and it works sometimes. but other times it uses the square scale transition, but that is only supposed to happen when the clip forst loads into the empty MC. Also sometimes the XML files is not seem like it is loaded and the words "test" are in the dynamic fields which is how it appears in the .fla file.


Any suggestions as to what might be happening?

Loading Multiple External Swfs Via String
I am trying to load as many as 5 external swfs via ASP.

i.e.,

<% if....then%>

<embed src="mymain.swf?content=1.swf&nav=2.swf&header=3.swf"......>

<% end if %>

Inside mymain.swf I have the appropriate variables: content, nav and header.

The first swf (1.swf) loads fine. But the others do not. I am loading the second two (2.swf and 3.swf) into the 1.swf. I have all the paths correct but it does not load. Is it even possible to pass a value this way?

------------

My main problem is that I want to load certain movies based on user preference- determined by ASP. Does anyone know how I can set this up?

Prob Loading External Swfs Into Multiple Placeholders
Hi, can you help? I'm making a website in flash where I have my main hompeage movie on level0 and the other links as external swfs inside the main homepage swf inside placeholders where external swfs are smaller than the main homepage thus you can still see the nav and logo

I've tried loading the movie into a placeholder empty movieclip which seemed to work on the surface but trying to go between the links repeatedly to check usability, to begin with they loaded the correct swf and in the right place, but after a few more goes between pages they just started to not appear and they couldn't cope so I applied some ginga logic

I decided to make more layers and put an empty mc in each an loaded each swf into itwith this code

_root.placeholderA.LoadMovieNum("clients.swf",1);

each on a separate level other than 0

with an instance name especially for that swf and six seperate empty movieclips to put my swfs into so they couldn't all be loading into the same one cos I thought it could be the prob, they are all seperate and on different layers but I can't seem to get anywhere, the links don't work at all, all I get is the homepage!!

Does anyone know why and how to fix it? please!!!

Help!

[F8] How To Prevent Loading Problems With Multiple External Swfs?
Hey guys,

Basically, my problem is that my site contains seperate external swf's for each of the pages (and sometimes external swf's inside those external swf's). My problem is that when a user clicks a button, but then clicks another button before the first external swf is loaded i get a double up of pages on the stage (and a triple-up if they click 2 buttons before the first one loads).

Could somebody tell me how to prevent this from happening?

Thx

[F8] Help With Code - Loading Multiple Swfs Array With Preloader
I have a main movie player that consists of play, rewind, forward, stop buttons and will preload 8 swfs (scenes) before it plays the first one in the array so that the movie will play smoothly. I was able to create the array and preload the movies but I could not make the first preloaded movie to play after the preloading is done. Also is there a way I can setup the preloader to calculate the total size of all the scenes instead of tracking the size of each scenes? Thanks in advance for your help..


Code:
var movieArray:Array = new Array("scene_one.swf", "scene_two.swf", "scene_three.swf", "scene_four.swf", "scene_five.swf", "scene_six.swf", "scene_seven.swf","scene_end.swf");
var moviePath:String = "";
var movieNum:Number = 0;
var movieLoadedTotal:Number = 0;
var movieListener:MovieClipLoader = new MovieClipLoader();
var movieListenerObject:Object = new Object();

_root.createEmptyMovieClip("containerMC", _root.getNextHighestDepth());
movieListenerObject.onLoadStart = function(targetMC:MovieClip) {
movieLoadedTotal++;
trace("- - - - - - - - - - - - - - - - - - - - - - -");
trace("LOADING_START (""+targetMC+"")");
};
movieListenerObject.onLoadProgress = function(targetMC:MovieClip, loadedBytes:Number, totalBytes:Number) {
trace("LOADING_STATUS (""+targetMC+""): "+loadedBytes+"/"+totalBytes);
};
movieListenerObject.onLoadComplete = function(targetMC:MovieClip) {
trace("LOADING_COMPLETE (""+targetMC+"")");
};
movieListenerObject.onLoadInit = function(targetMC:MovieClip) {
trace("LOADING_INIT (""+targetMC+"")");
trace("- - - - - - - - - - - - - - - - - - - - - - -");
if (movieLoadedTotal<movieArray.length) {
trace(movieLoadedTotal+"/"+movieArray.length+" loaded");
movieNum++;
movieListener.loadClip(moviePath+movieArray[movieNum], _root.containerMC);
} else {
trace("ALL DONE!");
_level0.containerMC.loadMovie("scene_one.swf");
_level0.containerMC.gotoAndPlay(2);
}
};
movieListenerObject.onLoadError = function(targetMC:MovieClip, errorCode:String) {
trace("LOADING_ERROR ("+targetMC+"): "+errorCode);
};
movieListener.addListener(movieListenerObject);
myTrace = function (textVar:String) {
_root.debugMC.debugTXT.text += textVar+"\n";
};
_root.attachMovie("debug", "debugMC", 99999);
_root.debugMC._x = Stage.width/2;
_root.debugMC._y = Stage.height/2;


movieListener.loadClip(moviePath+movieArray[movieNum], _root.containerMC);

General Method For Loading Multiple External Swfs
I was wondering if anyone had suggestions on the best way to load multiple swfs with individual instance names.

I need to load ALOT of external swfs into my main movie file, but I don't want to have to type the same code over and over again.
I also need to be able to access the imported swf by its instance name within my code, but I've been having trouble doing that too.

Can anyone help me out? I'd greatly appreciate it.

Loading Multiple SWFs Across Many Pages In A Flash Interface
I have a Flash AS3 interface that lets users go tto different pages with the usualy back & next buttons. Each page they come to loads in a page-specific XML file with content, and then possibly graphic files and/or SWF files.

My question is this: When a user happens to quickly click the next page button, they will gte each page to start loading its assets. I believe that this would cause pages that they didn't soend more that a fraction of a second on to continue loading in the background. So if they quickly click through 20 pages, all 20 pages' assets are loading. Sounds like I have a bad design on my hands!

Without designing/developing for it, is this the simple result of loading in a file to Flash? Should I look into stopping iles from dpownloading if a user leaves a page before it's fully downloaded? Is that even possible?

Any thoughts or advice would be greatly appreciated!

Loading Multiple External Swfs In The Main Movie
Hi,

in a flash site we have diff swfs which get loaded by click of the button. But here i have a small problem. In the main movie i have to load 2 different swfs 1 by 1. First is the menu and then the other swf which will keep playing untill the next click of the user.

need some fast feed back.

thanx
bncreator

Sequentially Loading Multiple Swfs Onto Movieclip Placeholders
Hi im relatively new to actionscripting, i just wanted to know if anyone knew where to look or how to go about creating a sequential preloader which loads 1 swf at a time onto place holders on a stage? so basically it would be a 3 x 3 grid of movie clip place holders which would load swfs onto each place holder. So the swfs would load direcltly after each other?

Loading Multiple SWFs & Swapping Their Load Order
Hi,

I'm currently working on a project that loads in 5 external SWF files (in the background) using this code:

var mainMCL:MovieClipLoader = new MovieClipLoader();
var mainListener:Object = new Object();
mainMCL.addListener(mainListener);
mainListener.onLoadInit = function(target_mc) {
target_mc._visible = 0;
};
mainMCL.loadClip("external/01.swf", holder.sec1);
mainMCL.loadClip("external/02.swf", holder.sec2);
mainMCL.loadClip("external/03.swf", holder.sec3);
mainMCL.loadClip("external/04.swf", holder.sec4);
mainMCL.loadClip("external/05.swf", holder.sec5);

Each of the 5 external files will be quite large in file size. My question, if a user selects a section from the main navigation before if has loaded how can I prioritize that section to load first but still continue to load the other files in the background?

Hope you can help!

Kind regards

Mark

2 Questions: Preload Multiple .swf's & Code For Loading Swfs On Levels?
Hi,

I have two questions that I hope someone can answer for me. I am learning flash still so please be patient with me.

1) I created my first 100% flash website. When it starts an intro plays in a continuous loop until the user clicks a button to go to the main menu. The background under the menu buttons has a movie that loops continueously. When the user puts their mouse over one of the 10 buttons it loads a different external .swf movie onto a level. For this button the movie clip loaded was called "biography.swf". To do this I used the code:

on (rollOver) {
loadMovieNum ("biography.swf", 1);
stop ();

When the user moves the mouse off of that button the movie disappears. To do this I added the below code to the same button:

on (rollOut) {
unloadMovieNum (1);

When the user releases the button it loads another external movie onto another level. To do this I used the code:

on (release) {
loadMovieNum ("biomovie.swf", 2);

In addition to this, whenever a user presses the button it unloads any external movies in levels 2 and 4 that may be running. All of my buttons are setup using the above code, but they load different movies into levels 1 and 2 depending on which button is pressed.

Here is where my questions begin:
For each button there is a different movie that loads (plays) when the user puts their mouse over it. There is also a different movie that loads when the user releases the button. Only one movie in level 2 will run. Never will two movies in level 2 run at the same time.

With that said...do I need to have each movie on separate levels? Did I encode this correctly or should I be using different commands?

2) My second question...

I would like ALL of the external movies to preload to the users cache before the user begins interacting with the site. This way the interaction with the site is fluid. With all of these external movies loading how do I do this?

I have found numerous tutorials, but I cannot get any of them to work the way I need them to. Help please?

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