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








How Do I Preload Multiple XML Files?


Hi there

I want to preload multiple XML files using the XML.load method.
I know how to do this for one XML file, but I'm interested in preloading multiple XML files (My data + config settings).

How would one do this?
I thought of 2 ways, but I don't think they're very nice programming:
1. Preload the first XML and do another XML.load within the XML.onload. But that way, you get a lot of nested functions if you want to preload more than 2 files.
2. Preload both the XML files at the same time, and use a counter to check if all the XML.onload are executed.

Are there other ways?




KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 04-24-2006, 09:11 AM


View Complete Forum Thread with Replies

Sponsored Links:

Preload Multiple Files
How would I go about preloading multiple files all at once with one progress bar?

Thanks.

View Replies !    View Related
Preload Multiple Files
Hello -

I suck at actionscripting and I am trying to learn it. Within the site I have my main file which has the opening animation as well as the home animation in it because I didn't want a pause while the home preloads. So when you click home it reloads again and is different which means you have to update both main and home for homepage content.

Is there a way I can preload the main page, and preload the home as well so I can eliminate having to make two pages with the same stuff? Here is the site

http://www.thedesigncompound.com/ikon

Thanks...

View Replies !    View Related
Preload Multiple XML Files
Hello all,

Can anyone point me to a bit of code that Preloads mulltiple XML files?


Thanks in advanced!!

Regards,
jc_

View Replies !    View Related
Preload Multiple XML Files
Hello all,

Can anyone point me to a bit of code that Preloads mulltiple XML files?


Thanks in advanced!!

Regards,
jc_

View Replies !    View Related
Preload And Cache Multiple Swf Files.
I have one main movie and as you click on seperate buttons on the menu the new movies load on top of each other in different levels. I want to load all these swf files and cache them in advance so that the viewer does not have to wait long for each one to load once the button is clicked. I am loading them into various levels, while the earlier ones r still open below.

Example:- I click button 1 and 1.swf is seen over the main movie. The menu resides on the main movie which is always open in the background. Now if I click button 2, then 2.swf opens on 1.swf and 1.swf is behind 2.swf until 2.swf completely opens up and once 2.swf is completely open and 1.swf is not visible only then 1.swf is unloaded. So I cannot load 2.swf into the same target as
1.swf , because both need to be open at the same time.
So how can I load 6 swf files with one preloader and keep opening them according to the one that is called.
Please Help

View Replies !    View Related
Preload External Multiple SWF Files
hello-

this is how im trying to preload external swf files:


Code:
var Count = 5;
for (var i = 1; i<Count; i++) {
var fileLoad= this.createEmptyMovieClip("fileLoad"+i, this.getNextHighestDepth());
fileLoad.loadMovie("swf/page"+i+".swf");

}
i am loading first four swf files from swf directory (page1.swf, page2.swf, page3.swf, page4.swf) - However, I WOULD LIKE THEM TO BE INVISIBLE WHEN THEY ARE PRELOADED TO THE STAGE.. how should i do that.. "fileLoad._visible = false;" does not work- please help!!!!!!!!!!!

View Replies !    View Related
Multiple Files Preload Progress?
Hi! I was wandering: how can I monitor the overall preload progress of a bunch of files preloading at once? I took a look to these 2 great classes:

http://code.google.com/p/bulk-loader/
http://code.google.com/p/queueloader-as3/

But I wasn't able to figure out how they can monitor the overall progress. I think you first should at least know the total weight of each file to load, but how could you retrieve it before starting to load it?

Anyone has any idea about the basic method of doing it?

View Replies !    View Related
Preload Multiple Files Simultaneously?
Hi! I'm having a problem preloading multiple .swf files simultaneously... I have a class that extends movieClip and I'm trying to use the movieClip loader class to preload content. The problem is that it only preloads the files in the last object. I guess the listener overwrites when new objects are created. How can I get by this problem?

An example of how I want this to work is at:

http://www.lexus-is.ru/

Can anyone please give me some advise or at least point me in the right direction?

Thanks in advance!

View Replies !    View Related
Preload Multiple External Files Beforehand...
Hi all,

I'm an advanced actionscript, to begin. So feel free to answer in as technical a way as possible. This is merely a situation I've yet to work with.

I haven't begun this phase of the project I'm working on, so there's still time for me to figure this out. Still, I figure I'll ask now just in case.

I'm developing a flash web site. I'd ideally like to load about 15 SWF files of varying file size (no more than 20kb at worst) BEFORE the site actually launches...but only one will be viewable at a time.

My experience shows that once a SWF is replaced in a movieclip via loadMovie, it has to completely redownload in order to work. Or does it cache and I'm just mistaken?

Shared Objects MAY be the answer, though I've yet to work with them. Can I only store text variables with them, or do I have the option of storing SWF files if I choose?

Or do you think just creating everything within movieclips in the one FLA file is the solution? This is not ideal, as I'm often moving to different computers at different locations and like the versitility of multiple SWFs.

Thanks in advance.

View Replies !    View Related
How To Preload Multiple Files At Once Using The Loader Class?
I have to load external files, and include a preloader. Usually it's simple:

ActionScript Code:
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadprogress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadcomplete);

function loadprogress(event:ProgressEvent) {
    var ratio = event.bytesLoaded/event.bytesTotal;
    loadbar.width = ratio;
}
function loadcomplete(event:Event) {
    trace("loading complete!");
}

loader.load(new URLRequest("http://blahblah..."));

But that's just for one file. Now I have to load several different files at once. The loading bar has to account for ALL of the files, which means the overall ratio should be [sum of bytes loaded]/[sum of bytes total].

The most convient way to start would be for me to put all their URLs into an array. But what do I do from there?

View Replies !    View Related
Preload Multiple Swf Files At The Broswer Cache...
hi guys. i cant resist but to post a new thread regarding preloading multiple swf while the main mvoie is playing. i have researched about this and found some helpful tips from websites but to no avail thus im giving you the link to my site and hoping that you could help me fix my problem

http://www.theanimeister.com/PRIME

the multiple swfs that im talking about can be found when you click the portfolio icon at the main menu where each artworks are thumbnailed and when u click on each, it loads the external swf file.

i was wondering if i can have all those external swfs to preload beforehand so when the user reaches that spot, the external swfs are ready to be loaded. i was thinking if they canbe preloaded while my long videos are playing perhaps?

i really need you guys help

peace and thanks
lui

View Replies !    View Related
[CS3] Preload Multiple Internal Movie Clips/files
Hello,

I'm relatively new to Actionscripting and have hit a wall - I'm making an overlay for myspace with a television which will have different channels(movie clips) which are changed by a remote control

http://www.doorshutpanik.com/test (you need to mouse over the remote on the floor to use the remote)

Only channels 1 & 2 have any content at present. Basically I need to have a preloader for each channel rather than the whole file and with it being myspace I can't load external .swf's as the channels.

Is this possible, everything i've come across either involves preloading the entire file or loading external files.

Any help/comments are much appreciated.

View Replies !    View Related
Preload Multiple Swf
I have one main movie which will load, says, 4 other swf files, in either _level1, _level2, or even replace some targets.
The question is, how to preload all these 4 movies so the main movie will play only when all these 4 movies are already loaded (and in the browser cache). Will an ordinary "If frame is loaded" work just fine ???

FYI I am still using Flash 4.

Thanks in Advance

View Replies !    View Related
Preload Multiple SWF
I am using oldnewbies preloader but am have a major problem. The movies dont preload...well they do..they just all begin to play...I just want to preload them for later use thats all....not sure why this doesnt work....someone please help?

// Hides displayed elements
this.reelmc._visible = false;
this.loadbar._visible = false;
percent_display = "";
//create a new movieclip to load
//the external movie into
this.createEmptyMovieClip("container1",10);
this.createEmptyMovieClip("container2", 20);
this.createEmptyMovieClip("container3", 30);
this.createEmptyMovieClip("container4", 40);
this.createEmptyMovieClip("container5", 50);
this.createEmptyMovieClip("container6", 60);
this.createEmptyMovieClip("container7", 70);
//load the external movie into the new movieclip
container1.loadMovie("1.swf");
container2.loadMovie("2.swf");
container3.loadMovie("3.swf");
container4.loadMovie("4.swf");
container5.loadMovie("5.swf");
container6.loadMovie("6.swf");
container7.loadMovie("7.swf");
//check the download status of the external
//movie once every frame
this.onEnterFrame = function() {
//trace the percentage of the movie that has loaded
percent = (this.container.getBytesLoaded()/this.container.getBytesTotal())*100;
if (!isNan(percent)) {
// trace(percent+"% loaded");
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent)+"% LOADED.";
}
this.loadbar._visible = true;
this.loadbar._xscale = percent;
if (percent>1) {
this.reelmc._visible = true;
}
container1.stop();
container2.stop();
container3.stop();
container4.stop();
container5.stop();
container6.stop();
container7.stop();
} else {
// trace("0% loaded");
}
if (percent == 100) {
delete this.onEnterFrame;
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
}
};
stop();

View Replies !    View Related
Q: Preload Multiple MCs
I'm having problems preloading multiple movie clips. I'm loading in four clips via loadMovie and then this code happens:


PHP Code:



stop();
_root.bin.onEnterFrame=function(){
    lkb1=_root.bin.pic1.bin.getBytesLoaded();
    tkb1=_root.bin.pic1.bin.getBytesTotal();
    lkb2=_root.bin.pic2.bin.getBytesLoaded();
    tkb2=_root.bin.pic2.bin.getBytesTotal();
    lkb3=_root.bin.pic3.bin.getBytesLoaded();
    tkb3=_root.bin.pic3.bin.getBytesTotal();
    lkb4=_root.bin.pic4.bin.getBytesLoaded();
    tkb4=_root.bin.pic4.bin.getBytesTotal();
    lkb=lkb1+lkb2+lkb3+lkb4;
    tkb=tkb1+tkb2+tkb3+tkb4;
    p=int((lkb/tkb)*100);
    if(p==100){
        _root.bin.gotoAndPlay("start");
        delete this.onEnterFrame;
    }
}




I'm pretty sure the targets and everything are correct - it works if I just preload one mc. But when I try to do this and add all the loaded bytes and all the total bytes I think it gets pissed or something. Any help would would be appreciated. Cheers!

View Replies !    View Related
Preload Multiple Swf Help
Hey peeps, working on a project at the moment which i have broken up into several individual swf's. Now i have about 3 swfs that i want to load to movie clip containers on the stage. Now thats not a problem but when i try to implement a preloader to display progress it just seems to show 0% and then 100% when its done rather then progressivly as the file loads. And the same with the _xscale of the loader bar. Here's what i have done.

www.freshvision.com.au/game/test_load.htm
and the fla is here
http://www.freshvision.com.au/game/load_screen.fla

If anyone can fix this or has a better way to go about this. Please do tell.

Thanks

View Replies !    View Related
Multiple Preload
i preload 4 imgs with


Code:
function loadFinished1 () {
trace("img1 loading complete")
}

function preload (clip, loadBar, loadText, callBack) {
var totalBytes = clip.getBytesTotal();
var loadedBytes = clip.getBytesLoaded();
var percentLoaded = Math.floor((loadedBytes/totalBytes)*100);
loadBar1._xscale = percentLoaded;
loadText.text = percentLoaded+"%";
if (totalBytes > 30 && totalBytes == loadedBytes) {
clearInterval (preload_interval);
callBack ();
}
}

//usage


mc1.loadMovie("1.jpg", 20);
preload_interval = setInterval (preload, 100, mc1, loadBar_mc, loadText_txt1, loadFinished1);
stop();

function loadFinished2 () {
trace("img2 loading complete")
play();
}

function preload (clip, loadBar, loadText, callBack) {
var totalBytes = clip.getBytesTotal();
var loadedBytes = clip.getBytesLoaded();
var percentLoaded = Math.floor((loadedBytes/totalBytes)*100);
loadBar2._xscale = percentLoaded;
loadText.text = percentLoaded+"%";
if (totalBytes > 30 && totalBytes == loadedBytes) {
clearInterval (preload_interval);
callBack ();
}
}

//usage


mc2.loadMovie("2.jpg", 20);
preload_interval = setInterval (preload, 100, mc2, loadBar_mc, loadText_txt2, loadFinished2);
stop();

function loadFinished3 () {
trace("img3 loading complete")

}

function preload (clip, loadBar, loadText, callBack) {
var totalBytes = clip.getBytesTotal();
var loadedBytes = clip.getBytesLoaded();
var percentLoaded = Math.floor((loadedBytes/totalBytes)*100);
loadBar3._xscale = percentLoaded;
loadText.text = percentLoaded+"%";
if (totalBytes > 30 && totalBytes == loadedBytes) {
clearInterval (preload_interval);
callBack ();
}
}

//usage


mc3.loadMovie("3.jpg", 20);
preload_interval = setInterval (preload, 100, mc3, loadBar_mc, loadText_txt3, loadFinished3);
stop();


function loadFinished4 () {
trace("img4 loading complete")

}

function preload (clip, loadBar, loadText, callBack) {
var totalBytes = clip.getBytesTotal();
var loadedBytes = clip.getBytesLoaded();
var percentLoaded = Math.floor((loadedBytes/totalBytes)*100);
loadBar4._xscale = percentLoaded;
loadText.text = percentLoaded+"%";
if (totalBytes > 30 && totalBytes == loadedBytes) {
clearInterval (preload_interval);
callBack ();
}
}

//usage


mc4.loadMovie("4.jpg", 20);
preload_interval = setInterval (preload, 100, mc4, loadBar_mc, loadText_txt4, loadFinished4);
stop();
how can i say, instead of

function loadFinished3 () {
trace("img3 loading complete")

}

to trace "all images complete" when ALL images are loaded?

thank u very much!

View Replies !    View Related
How Do I Preload Multiple .swf's
Hi everybody,

I'm currently making a new website for my local football club, and although the intended audience doesn't have to experience anything too fancy, i can't help but to try and create a seamless web viewing experience. I'm working on MX 2004, and I'm basically just trying to teach myself how to do all this. I've uploaded the beginnings of my site to www.claytonfc.com so you can see what i'm trying to achieve. Is there a way of preloading all the external swf's so that my (very basic) preloader won't kick into the main movie until all required swf's are loaded and ready for immediate viewing when the appropriate button is pressed?

I've loaded most external movies into empty movie clips. Can i preload the content within the empty movie clips before starting the main movie? Also, loaded movies that have button actions(scrolling text etc...) don't seem to work inside a blank MC, I have to load them onto another level.

Any help would be appreciated.

Regards,
Nievvy16

View Replies !    View Related
Preload Multiple MCs
I'm having problems preloading multiple movie clips. I'm loading in four clips via loadMovie and then this code happens:


ActionScript Code:
stop();
_root.bin.onEnterFrame=function(){
    lkb1=_root.bin.pic1.bin.getBytesLoaded();
    tkb1=_root.bin.pic1.bin.getBytesTotal();
    lkb2=_root.bin.pic2.bin.getBytesLoaded();
    tkb2=_root.bin.pic2.bin.getBytesTotal();
    lkb3=_root.bin.pic3.bin.getBytesLoaded();
    tkb3=_root.bin.pic3.bin.getBytesTotal();
    lkb4=_root.bin.pic4.bin.getBytesLoaded();
    tkb4=_root.bin.pic4.bin.getBytesTotal();
    lkb=lkb1+lkb2+lkb3+lkb4;
    tkb=tkb1+tkb2+tkb3+tkb4;
    p=int((lkb/tkb)*100);
    if(p==100){
        _root.bin.gotoAndPlay("start");
        delete this.onEnterFrame;
    }
}


I'm pretty sure the targets and everything are correct - it works if I just preload one mc. But when I try to do this and add all the loaded bytes and all the total bytes I think it gets pissed or something. Any help would would be appreciated. Cheers!

View Replies !    View Related
Multiple Movie Preload
HI!
Here is my situation. I have a series of swfs that need to be run one right after the other. Is there a way for me to preload the next one while the current one is playing so that I don't have to wait at the end of the current swf to load the next one? I guess what i'm asking is that is there a way to preload the next movie and stop it(rather than let it play) while the current clip is playing? PLEASE HELP!

View Replies !    View Related
Preload Multiple Movies
I have a flash movie with a preloader, and was wondering if its possiable to preload other swf movies at the same time.

Any help would be grand

Cheers!

View Replies !    View Related
Whats The Best Way To Preload Multiple SWF's At Once.
Hey guys,

To be honest never came across this problem before.

Shaun.

View Replies !    View Related
Preload Multiple Scenes
can anyone tell me the script for a preloader that will load multiple scenes.

thanks for your help

View Replies !    View Related
Multiple Movie Preload Help
I hope I can explain this well enough for you to understand. I'm trying to preload my main movie without preloading the external movies that are scritped within the movie. The preloading with the main movie goes fine but then when I call the external movie it opens it instantly like it had already been preloaded I want it to call the movie and then preload it at that point. The external movie does have a preloader also. Could anyone help me with this. The script I'm using on a frame action is :

_root.createEmptyMovieClip("cprofile", 1);
loadMovie("profile.swf", "cprofile");
cprofile._x = 156;
cprofile._y = 3;

The profile.swf does have a preloader but it doesn't use it and I know it's not just loading it quickly because it's bigger than the main movie and I'm on dial-up. Thanks.

View Replies !    View Related
Preload Multiple External Swf
ive gone through almost every thread on this forum trying to find the answer to this but nobody has an answer that works. im trying to create a preloader to my site that loads external swfs that appear later in the site (like cached into the browser), the problem im having has to do with the particular type of preloader im using, it is found on flash kit tutorials
http://www.flashkit.com/tutorials/In...-855/index.php
i would like to somehow load the external swfs and monitor the bytesloaded and bytestotal, and upon completion not display them, i believe its possible, but nothing i try seems to work, the files are included if youd like to take a look,

thanks in advance for your help

View Replies !    View Related
Preload Multiple External Swf
ive posted this once before, but the help i got did not work. heres what im trying to do: i want a main preloader that loads other swfs within itself, but doesnt show them, all i want to do is preload them and have them cached into the browser. ive used all types of methods to get this to work (loadmovie, loadmovienum, getbytesloaded, etc..) but no matter what code i use, the main preloader will not track the total bytes nor the loaded bytes of the external files. ive tried levels ive tried container clips and every variety of getbytesloaded command i can think of. i have no idea what is wrong, im still rather new at this so im probably omitting some small detail thats screwin me up. do i need a preloader on the external files themselves? is this possible? ive read through this forum and many others but nothing ive tried or downloaded works. heres one example of what ive tried:

Actions Frame 1 of main preloader

loadMovie("opening.swf", "container");

actions frame 2 of main preloader
totalbytes= container.getBytesTotal();
loadedbytes= container.getBytesLoaded();
if (loadedbytes == totalbytes) {
container.gotoAndPlay(1)}

and then the gotoandplay 2 frame later on in the timeline, this is just the foundation of what im trying to od, but it still loads immediately in testmovie (even with streaming) and doesnt load or cache anything when uploaded to the web. if anybody has a simple to understand layout of how something like this would work and if my externals need any altering , id really appreciate it.

thanks

View Replies !    View Related
Preload For Multiple Movies
So I have a small movie with my a preloader, navigation, and empty mc that I load all of my other movies into. What I want to do is, at the end of my movie, where my buttons are, have the playhead go back to frame one and pass a variable or something telling it to load a different movie into the placeholder mc, then have my preloader preload that movie. I'm not going to bother posting my preloading script, because I'm sure it's not the best way, so I'm just looking for new suggestions/ideas on how to do this. And I appologize if this has been asked before, I just couldn't find what I was looking for in the forums. Thanks!

View Replies !    View Related
Preload Multiple Swf's Problem
I have a movie with three buttons that load 3 external swf's, with a preloader. Now I want all the external swf's to have a preloader as well. So I used the preloader script on the 3 external swf's, but when I test it, the movie starts at the first frame, where the preloader of the first swf is supposed to start, but nothing happens. Anyone have a clue, or maybe know a tutorial on this?

regards

View Replies !    View Related
Preload Multiple Mc's At One Time?
i have a photo album whichget a integer from a .php file and duplicates a movie clip that many times then loads a thumbnail created by a .php file from the larger image(for shorter laoding time. all of that is one movie which is loaded into my main movie. the movie itself is preloaded when the user selects the button to load that file. is it possible to preload all these tumbnails at the same time the movie is loaded?

View Replies !    View Related
Preload Multiple Movies?
hello,
ive got a very large flash movie that ive broken into 8 segments and used "loadMovie" at the end of each segment to open the next one and close the previous one.
however when i put them onto cd they take almost a minute to load. is there a way to preload these other movies while the first is playing?

or maybe a better way altogether to link them?

oh.. and i cant export them as one because i always get "not enough memory" and it fails. ive tried it on a couple PC's and they shouldnt be having that problem.

well, thanks for any help offered.
jon

View Replies !    View Related
Preload Multiple SWFs
Hey all,

I've been banging my head against the wall for about 2 days now so I've finallly broke down and I'm posting a message.

I want to be able to preload 2 swf files but not have them automatically start playing. Here's the jist of my movie:

1. Preload both swfs with one percentage bar displayed to the user
2. Start playing the first swf immidietly
3. Halfway through the first swf, call the second one to start playing.

Any help would be much appreciated. I'm using Flash 8 so I guess the MovieClipLoader class would be the best way to go...

Thanks.

-Jason

View Replies !    View Related
MCL To Preload Multiple Images From XML
hi there,

i'm having a nightmare trying to create multiple instances of the moviecliploader to preload many images referenced from an XML file. i want a preloader for each image but it only ever shows the last one. i think thats because i can't increment the moviecliploader variable name and so after cycling through the for...loop, only the last iteration preloader is shown. i've tried writing the loading portion in a seperate function but got confused as to where i was targetting. i've tried many other ways with temporary references and extra arrays with no luck. the code is below:


PHP Code:




this.createEmptyMovieClip("container_mc", 0);

var gotx:XML = new XML();
gotx.ignoreWhite = true;

var pics:Array = new Array();
var captions:Array = new Array();
var holders:Array = new Array();


gotx.onLoad = function() {
    //trace("onLoad");
    
    var photos:Array = this.firstChild.childNodes;
    
    for(i=0; i < photos.length; i++) {
        
        //ADDS PICTURES TO ARRAY
        pics.push(photos[i].attributes.pic);
        captions.push(photos[i].attributes.caption);
        
        //GENERATES HOLDER FOR MOVIECLIP WHERE PICTURE IS LOADED
        container_mc.createEmptyMovieClip("holder"+i, (10+i));
        
        //ADDS HOLDERS TO ARRAY
        holders.push(container_mc["holder" + i]);
        //trace(holders);
        
        //GENERATES HOLDING CLIPS FOR EACH PICTURE
        container_mc["holder" + i].attachMovie("clip", "clip"+i, (10+i), { _x:0, _y:(i * 225) });
        
        //CREATES TEMPORARY REFERENCE TO EACH HOLDER
        var rollHold = holders[i];
        rollHold.captionValue = i;
        
        
        //LOADS EACH PICTURE INTO A HOLDING CLIP
        //container_mc["holder" + i]["clip" + i].loadMovie(pics[i]);
        mcLoader.loadClip(pics[i], container_mc["holder" + i]["clip" + i]);
        
        var mcListener:Object = new Object();
        mcListener.onLoadStart = function(target_mc:MovieClip) {
            trace("started");
            attachMovie("counter", "counter"+[i], (500+i), { _x:0, _y:(i * 10) });
        }
        mcListener.onLoadComplete = function() {
            trace("finished");
            //removeMovieClip("counter"+[i]);
        }
        mcListener.onLoadProgress = function(target_mc:MovieClip) {
            //attachMovie("counter", "counter"+[i], (1000+i), { _x:0, _y:(i * 50) });
        }
        mcListener.onLoadInit = function(target_mc:MovieClip) {
            removeMovieClip("counter"+[i]);
        }
        
        var mcLoader:MovieClipLoader = new MovieClipLoader();
        mcLoader.addListener(mcListener);
        mcLoader.loadClip(pics[i], container_mc["holder" + i]["clip" + i]);
        
        
        //ROLLOVER BEHAVIOUR FOR EACH IMAGE USING TEMPORARY REFERENCE
        rollHold.onRollOver = function() {
            //trace("allow that");
            trace(photos[this.captionValue].attributes.caption);
        }
        
        rollHold.onRelease = function() {
            //trace("allow that");
            caption_txt.text = photos[this.captionValue].attributes.caption;
        }
    
    }
}

gotx.load("autumntry4.xml");

//







i've seen what i want working on many sites so it can't be too tough. this has been driving me nuts all day and i've searched loads of threads and tutorials but not found an answer. can anyone help me???

cheers,

dave.

View Replies !    View Related
Preload Multiple SWF's In Background
I have a index Flash page with an empty movieclip called 'container' that loads external SWF movieclips corresponding with the menu buttons that are pressed.

I want my Flash file to start loading all the external SWF movieclips in the background as soon as the website is initiated, so that they are already loaded when a button is pressed. How can I do this?

By the way, the external SWF's are pretty small, that's why I want to load them 'on the fly' when a visitor opens the website.

Help would be greatly appreciated.

View Replies !    View Related
Preload Multiple Swf Before Start...
hi guys,

anyone know how to preload mulitple swfs before starting the movie?

say I have 10 swf (swf1~swf10) to be loaded from external and I have to preload 1 and 2 first before i can start playing swf1. Once the swf1 is done playing I have to check if swf3 already done preloaded, if so, play swf2, and so on...

I think about it for many days still did not find any solution. maybe some of you can share some of the experience. thanks!

View Replies !    View Related
Multiple Movie Preload
Hello,
I have a flash movie with a preloader on scene 1, and the content in scene 2. From here I have buttons that load extenal movies when clicked.

However I need to find out how to preload the external movies from the main movie, preferably in scene 1 with my preloader. If this can be done, please can you tell me where this would fit into my preloader code:


ActionScript Code:
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1024);
totalkbytes = Math.ceil(totalbytes/1024);
if (loadedbytes == totalbytes) {
    gotoAndPlay(4);
}
percentage = int(loadedbytes/(totalbytes/100));
loader.gotoAndStop(percentage);

Your help will be greatly appreciated!

View Replies !    View Related
Preload Multiple Swfs
Hi peeps

I need some serious help here.. I'll explain..

I have some xml(loaded seperately) which loads in great.

Next I need my main movie "base.swf" To preload itself, and a bunch of other swfs which are detailed in the xml and put into an array. As one percentage.

SO Base.swf bytes + each mc in array bytes = x

I then get a total percentage which I need to turn into degrees for a pre-loader that rotates from 0 to 360.

However, another thing that i have to be sure of is that we give each mc in the array enough time to return its true byte size as im sure your aware that some times if the server is slow or un-reponsive if you only check the bytes once it may return 0 bytes the first few times, this absolutely cannot happen.

SO some sort of checker that says make sure the bytes total for each mc = something before i make it part of the percentage.

I think my theory is correct, but i don't have a clue how to go about doing this.

Oh yeah, I dont want to loop frames so this should be done on enterframe in an mc, preferably created dynamically and then unloaded when done

Hope this is possible and you guys can help, i need to get this sorted for the new year for a project and its the only bit thats causing me some grief... and once done the rest of the project should be smooth sailing, i like the sound of that....

Merry Christmas, happy new year, and thanks in advance.

Paul

View Replies !    View Related
Looking For A Way To Preload Multiple Swfs
I originally created a single file with 18 scenes, but have since switched to a structure that load the swf's chronologically and when a user picks one to watch from the menu.

Im looking for a newbie-proof example to reverse engineer'(or a good tutorial)

What I need is a way to preload the swf's ahead without it displaying or advancing its frames until it is called.

any suggestions

View Replies !    View Related
Preload Multiple Swfs At Once -- How?
Need a little help please...

I know how to preload and load external swfs into my flash mx movies... however, now I have to load more than one at a time and play them when they are all loaded.

I suspect I must incorporate some sort of array into my preload function but do not knowhow...

any help would be appreciated greatly...

thanks to all who reply.

--vagabond007

View Replies !    View Related
[FMX] Preload Multiple Jpgs
Hi there,
I'm currently making a xml driven photo gallery. The first stage is loading in the thumbnails, each thumbnail will preload individually. I pretty close to acheiving this except my current script only loads in the first jpeg. I have tried everything and I jsut can't find a problem. Anyway my code is below if anyone gets a chance to look. Sorry its a bit hefty. I think the problem is with the ThumbLoadingEnterFrame and LoadNextThumb functions.

Any help much appreciated
Cheers

PHP Code:



count = 0;
var thumbImage = new Array();
var thumbClip = new Array();
var jpegImage = new Array();
function ThumbLoadingEnterFrame() {
    var lod = this.loader_mc.getBytesLoaded();
    var tot = this.loader_mc.getBytesTotal();
    if (lod && tot) {
        var percent_loaded = lod/tot;
        this.progress_mc._xscale = 100*percent_loaded;
        if (percent_loaded == 1) {
            LoadNextThumb();
            delete this.onEnterFrame;
        }
    }
}
function LoadNextThumb() {
    //trace(thumbImage.length);
    if (count<thumbImage.length) {
        var imgURL = thumbImage[count];
        thumbClip[count].loader_mc.loadMovie(imgURL);
        thumbClip[count].onEnterFrame = ThumbLoadingEnterFrame();
        count++;
    }
}
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(success) {
    if (success) {
        var mySection = gallery_xml.firstChild.childNodes[0];
        var picCount = mySection.childNodes.length;
        for (var i = 0; i<picCount; i++) {
            //Populate Arrays
            count++;
            thumbImage.push(mySection.childNodes[i].attributes.thumbURL);
            jpegImage.push(mySection.childNodes[i].attributes.jpegURL);
            tnHolder = _root.attachMovie("thumb_container", "tc"+count+"_mc", count);
            thumbClip.push(tnHolder);
            tnHolder.progress_mc._xscale = 0;
            tnHolder._y = i*100;
        }
        count = 0;
        LoadNextThumb();
    } else {
        trace("Error loading XML file");
    }
};
gallery_xml.load("gallery.xml"); 

View Replies !    View Related
Best Solution (Preload Multiple SWF)
I have a main.swf which has a MC, container. Container is used to load in several other SWF on top of main.swf (Main shell for site) when buttons are pressed.

I want to preload all the SWF files together with one preloader, 4 in total. Then when a button is pressed, the SWF instantly appears. loadMovieNum I'm guessing won't work for me as I'm loading the SWFs into MCs, not levels. Setting the alpha to zero would work for one but not all? Four MCs, container1, container2 etc... Load the SWFs in, set opacity to zero and set to full when a button is clicked?

What's the best solution?

Thanks

View Replies !    View Related
Preload Multiple SWFs
I'll keep this brief.

I have several SWFs built and ready for playback in a container SWF with volume controls, and next/previous/pause/play/stop controls (a-la a DVD player or VCR).

This particular project is a product demo, with different scenes that you can navigate through using the on-screen "remote" or just let it play through.

I need to know how to preload all of the external SWFs in one shot. I don't want to load them as the demo plays, or when they're needed. It's fairly critical that they all be loaded during one preloader sequence so that they can play seamlessly between eachother.

I've tried MovieClipLoader -- but it's not quite suited for multiple SWF preloading. Nothing is.

Suggestions?

View Replies !    View Related
Preload Multiple Images From XML
Hi,

i am using XML to load multiple images to flash. Now my vision is to make some kind of preloader. What is the best way to know that all images are loaded?

Thanks!

View Replies !    View Related
How Do I Preload Multiple FLVs?
So here is the task at hand. I have a site which calls in a swf. In this swf There are 4 streaming FLVs. The Client is having a problem with them loading, mainly because her internet connection sucks ***. Is there any way to have the flvs begin to download as soon as she enters the site?

Ahhh! Alien!

View Replies !    View Related
Trying To Preload A Doc With Multiple Jpgs
Hi everyone. I'm trying to create a flash document that just does a slideshow through the images, but the image paths are all in an external xml file (this is because we are going to randomize that xml file on the fly with server scripting) and I want a preloader that loads the swf and all 5 of the external images that are in the document. The way I was able to get it to work is to use this script to load the XML doc and the images:

function loadXML(loaded) {

if (loaded) {

//pulls all data from the xml file
xmlNode = this.firstChild;
path = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {

path[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;

}
changeImage();

} else {

content = "file not loaded!";

}

}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("flashbanners/homebanner.xml");

function changeImage() {

container1.loadMovie(path[0], 1);
container2.loadMovie(path[1], 1);
container3.loadMovie(path[2], 1);
container4.loadMovie(path[3], 1);
container5.loadMovie(path[4], 1);

}

And then I call that changeImage(); function on each keyframe when a new image container appears. It's the only way I could figure it out to get it to work this way, although I'm sure there is a better one. Here is the preload script I was trying:

preloader._visible = false;

this.onEnterFrame = function() {

//finds out how much of the clip is loaded
filesize = Math.round(getBytesTotal());
loaded = Math.round(getBytesLoaded());

//starts the preloader if everything is not loaded yet
if (loaded != filesize) {
preloader._visible = true;

//preload bar length
preloader.preload_bar._xscale = 100*loaded/filesize;

//percentage number
loaded_bytes = Math.round(getBytesLoaded());
loaded_total = Math.round(getBytesTotal());
total_percent = (loaded_bytes/loaded_total)*100;
preloader.loaded_text = Math.round(total_percent);

} else {

preloader._visible = false;


}

};

So, is it even possible for a preloader to do that? I got one to work that preloaded each image as it came up, but that's not the solution I'd like. I appreciate anyone's input!

View Replies !    View Related
Preload Multiple External Swf's
Hi

I need a script to preload many ext swf's. I'm using loadMovieNum in the main movie. Please help

www.neiljohnsmith.com

View Replies !    View Related
Preload Multiple Swf's Problem
I have a movie with three buttons that load 3 external swf's, with a preloader. Now I want all the external swf's to have a preloader as well. So I used the preloader script on the 3 external swf's, but when I test it, the movie starts at the first frame, where the preloader of the first swf is supposed to start, but nothing happens. Anyone have a clue, or maybe know a tutorial on this?

regards

View Replies !    View Related
Preload Multiple Swfs At Once -- How?
Need a little help please...

I know how to preload and load external swfs into my flash mx movies... however, now I have to load more than one at a time and play them when they are all loaded.

I suspect I must incorporate some sort of array into my preload function but do not knowhow...

any help would be appreciated greatly...

thanks to all who reply.

--vagabond007

View Replies !    View Related
[FMX] Preload Multiple Jpgs
Hi there,
I'm currently making a xml driven photo gallery. The first stage is loading in the thumbnails, each thumbnail will preload individually. I pretty close to acheiving this except my current script only loads in the first jpeg. I have tried everything and I jsut can't find a problem. Anyway my code is below if anyone gets a chance to look. Sorry its a bit hefty. I think the problem is with the ThumbLoadingEnterFrame and LoadNextThumb functions.

Any help much appreciated
Cheers

PHP Code:



count = 0;
var thumbImage = new Array();
var thumbClip = new Array();
var jpegImage = new Array();
function ThumbLoadingEnterFrame() {
    var lod = this.loader_mc.getBytesLoaded();
    var tot = this.loader_mc.getBytesTotal();
    if (lod && tot) {
        var percent_loaded = lod/tot;
        this.progress_mc._xscale = 100*percent_loaded;
        if (percent_loaded == 1) {
            LoadNextThumb();
            delete this.onEnterFrame;
        }
    }
}
function LoadNextThumb() {
    //trace(thumbImage.length);
    if (count<thumbImage.length) {
        var imgURL = thumbImage[count];
        thumbClip[count].loader_mc.loadMovie(imgURL);
        thumbClip[count].onEnterFrame = ThumbLoadingEnterFrame();
        count++;
    }
}
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(success) {
    if (success) {
        var mySection = gallery_xml.firstChild.childNodes[0];
        var picCount = mySection.childNodes.length;
        for (var i = 0; i<picCount; i++) {
            //Populate Arrays
            count++;
            thumbImage.push(mySection.childNodes[i].attributes.thumbURL);
            jpegImage.push(mySection.childNodes[i].attributes.jpegURL);
            tnHolder = _root.attachMovie("thumb_container", "tc"+count+"_mc", count);
            thumbClip.push(tnHolder);
            tnHolder.progress_mc._xscale = 0;
            tnHolder._y = i*100;
        }
        count = 0;
        LoadNextThumb();
    } else {
        trace("Error loading XML file");
    }
};
gallery_xml.load("gallery.xml"); 

View Replies !    View Related
Best Solution (Preload Multiple SWF)
I have a main.swf which has a MC, container. Container is used to load in several other SWF on top of main.swf (Main shell for site) when buttons are pressed.

I want to preload all the SWF files together with one preloader, 4 in total. Then when a button is pressed, the SWF instantly appears. loadMovieNum I'm guessing won't work for me as I'm loading the SWFs into MCs, not levels. Setting the alpha to zero would work for one but not all? Four MCs, container1, container2 etc... Load the SWFs in, set opacity to zero and set to full when a button is clicked?

What's the best solution?

Thanks

View Replies !    View Related
Preload Multiple SWFs
I'll keep this brief.

I have several SWFs built and ready for playback in a container SWF with volume controls, and next/previous/pause/play/stop controls (a-la a DVD player or VCR).

This particular project is a product demo, with different scenes that you can navigate through using the on-screen "remote" or just let it play through.

I need to know how to preload all of the external SWFs in one shot. I don't want to load them as the demo plays, or when they're needed. It's fairly critical that they all be loaded during one preloader sequence so that they can play seamlessly between eachother.

I've tried MovieClipLoader -- but it's not quite suited for multiple SWF preloading. Nothing is.

Suggestions?

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved