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




Loading Multiple Swf Files Without Disaster



Could anyone advice me about a strange problem i am having. i would be thankful.

Ok i have a home.fla with navagational menu buttons, and a linebox in which to display an image loaded from another swf file.

here is an example of the simple actions i have assigned to one of the navigational buttons:

on (release) {
loadMovieNum("filename.swf", 1);
}

i have tried loading them on every different level (ie. 0,1,2 etc)

I want to load the seperate swf files within the home fla, but for some reason it seems to load completely over it, where you cannot see the navigational menu, even though the loaded swf file does not have anything in the area where it somehow covers the original home.fla

does this make any sense? i would be happy to email the fla file if someone might be able to take a look at this.

please help me if you can, i would be really grateful.



FlashKit > Flash Help > Flash General Help
Posted on: 05-11-2004, 02:52 AM


View Complete Forum Thread with Replies

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

Loading Multiple Swf Files Without Disaster
Could anyone advise me about a strange problem i am having. i would be thankful.

Ok i have a home.fla with navagational menu buttons, and a linebox in which to display an image loaded from another swf file.

here is an example of the simple actions i have assigned to one of the navigational buttons:

on (release) {
loadMovieNum("filename.swf", 1);
}

i have tried loading them on every different level (ie. 0,1,2 etc)

I want to load the seperate swf files within the home fla, but for some reason it seems to load completely over it, where you cannot see the navigational menu, even though the loaded swf file does not have anything in the area where it somehow covers the original home.fla

does this make any sense? i would be happy to email the fla file if someone might be able to take a look at this.

please help me if you can, i would be really grateful.

What A Disaster - Images Downloading Multiple Times
I have different images at various points in my movie, all of which are loaded with the following code:
var myMCLoader:MovieClipLoader = new MovieClipLoader();
myMCLoader.loadClip("images/myImage", this);

This is not working well because:
1. The images do not download in the background until they are accessed on the timeline
2. Flash attempts to download them every time they appear.

I thought Flash would download each image in the background just once and then that would be it.

The preloaders I make preload content and then show it immediately once it's downloaded. How can I preload something and then use it later?

Also, if the user clicks the back button to return to the beginning of the timeline, the preloader kicks in again (it's on frame 1) and downloads the image again! I want Flash to download stuff just once.
Someone please help.

Pre-loading Multiple .swf Files
Is there a way to pre-load multiple .swf files? Obviously one can build a loader to preloader for a single movie, but is there a way to preload other .swf files into cache? HELP!!!

Pre-Loading Multiple SWF Files
Hey all,

I'm realy stuck even after all the help i had from you guys.

I'm having an opening SWf file with a game and a preloading animation.
The idea is to let people play this little game untill all the other swf files are loaded completely.

Where do i tell my first swf to pre-load all the swf files and what code should be used. I tried a bunch of things but i'm not the best (if not the worst) with scripts. My idea is that i have to give all the swf files there own pre-loaders, but i'm not sure.
As soon as all the swf's are loaded the game has to stay onscreen but the preloader animation has to be replaced by a button like "enter".

What to do?
Who can Help?

Loading Multiple Txt. Files
O.K., I learned how to externaly load text in my movie. It loads into a slideshow.Now I want a second txt.file to load on the second slide. I tried several things but couldn't figure it out. Here's the code:

_root.block_mc.onEnterframe = function() {
_root.block_mc.textfileUrl = "pirate.txt";
_root.block_mc.gotoAndPlay(2);

Anyone can help me?

regards

Loading Multiple Swf Files
I have a main swf, I want to load multiple swf files that dont immediately start playing. How do I get them to start playing when I want them to? I cant hit my head on the desk anymore I need help!!!

Loading Multiple Swf Files
Is it possible to click on a button in one swf file, and have it load a swf file on top of the current movie, plus load it on top of a different swf file at the same time? So that when you proceed onto the second movie, the swf file is already there in the same place.

Loading Multiple Swf Files
Hi,
In my main swf I have multiple holder each with corresponding swf file to load in.They all load in at the same time. Problem is the site is darn slow at that time. Any solution on how to preload them at once and use delay to make them appear on screen one at a time like first externswf1 appears then xternswf2 appears,... untill I get all my external swf visible on my main swf. Or is there an other better way to make my page run smooth on load off the contentfiles(extern.swf's). Any help would be awsome I'm stuck here. Grtz

[F8] Loading Multiple Txt Files Into Swf...
I am wanting to put, lets say 3 text areas in one swf. They will all have the same format characteristics. My simple way of looking at this is to duplicate the code and change the variables and instance names to allow the load and css to apply to each. NOPE! That does not work. Hehehe. Here is what I have for one text frame.


function textLoader() {
myData = new LoadVars();
myData.onLoad = function() {
homeText_txt.html = true;
homeText_txt.htmlText = this.myVariable;
};
myData.load("homeText.txt");
}

var myCSS = new TextField.StyleSheet();
myCSS.load("myStyle.css");
myCSS.onLoad = function() {
homeText_txt.styleSheet = myCSS;
textLoader();
};

Loading Multiple XML Files
If you had 4 XML files that all contained sets of image links that you were trying to load in to Flash and create thumbnail galleries of, would it be necessary to keep the XML files containing the links loaded even after the images have already been displayed? I'm running in to some trouble keeping previously loaded images from an XML file open after loading the next set of data.

More specifically, can all 4 XML files be loaded into the same flash XML...

Code:
imageData_xml = new XML();
as long as I get all the necessary data out before loading the next XML? Or will it have to be written this way...

Code:
imageData_xml_1 = new XML();
imageData_xml_2 = new XML();
imageData_xml_3 = new XML();
imageData_xml_4 = new XML();
so that the actual image links are always present.

Both ways give me the same problem, previously loaded images are removed when the next set are loaded (and they're being loaded into different movieclips on different frames, so shouldn't be overwriting itself).

Can someone enlighten me on the correct approach to loading these, and maybe explain what Flash exactly does with the XML data? (stores it locally and maintains the image links or serves no function after the images have been loaded?)

Thanks

Loading Multiple Xml Files
I have an application that loads data into a datagrid. I have a list component when clicked it unloads the previous xml and loads the appropriate xml into the grid. Everything works fine, but after a few clicks the datagrid loads become slow and after a awhile the flash player error pops up "a script in the movie is causing flash player to play slowly." Is there a way around this.

thanks

Loading Multiple Files With MCL?
Hello, I have set up a new MovieClipLoader Class Object to load external files into flash.

var myMCL:MovieClipLoader = new MovieClipLoader();

I have 2 different movieclips that will be loading in 2 different external files. Can I use this same MCL object for both of them? If so, how do I set up 2 preloaders from the same object? Thanks in advance...

Loading Multiple XML Files
My problem:
I have multiple XML files to load and each must pass a param to the loadedXML function below. How do I do this correctly. I have the loading part down, but I cannot get the param to pass.
I was trying to feed another param to the onLoad function but it wouldnt take anything else except its "success" param. And I know that its clearly wrong (the prefix param that is). Is there a better way to do this? In my example I do not show the fact that I AM going to load muliple files within a loop.... im really trying to get that param passing to work.







Attach Code

function loadedXML(success:Boolean, prefix:String) {
clearInterval(intervalID);
if (success) {
var xmlRootNode:XMLNode = this;
// number of works
totalWorks = xmlRootNode.firstChild.childNodes.length;
// fill arrays
for (var i = 0; i < totalWorks; i++) {
_root[prefix + '_thumb_arr'].push(xmlRootNode.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue);
_root[prefix + '_main_arr'].push(xmlRootNode.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue);
_root[prefix + '_caption_arr'].push(xmlRootNode.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue);
}
if (++xml_files_loaded == xml_files_total) {
gotoAndStop(3);
} else {
my_txt.text = "loading external content: " + xml_files_loaded + ' / ' + xml_files_total;
my_txt.setTextFormat(rrie_0_fmt);
}
} else {
trace("couldnt load this XML_file: " + prefix);
}
}
var tr_sec_1_xml:XML = new XML();
tr_sec_1_xml.ignoreWhite = true;
tr_sec_1_xml.load(imageRoot_arr[2] + productXML_arr[2] + '1' + '.xml');
tr_sec_1_xml.onLoad = loadedXML('tr_sec_1');

Loading Multiple Xml Files.
Ive got an xml based menu and an xml based photogallery on the same frame on my timeline.
when i try to preview the movie only the photogallery xml file loads.

i was just wondering if anyone knows a method to load two xml files at the one time, or one after the other..

ive been following the kirupa tutorials for xml menu and xml photogallery.. so my code is very similar to them.
thanks in advance.
Chris.

Loading Multiple Swf Files
Hi,

I have about 100 swf files(containing audio) which will be played based on the user's preference. now what i want to do is when the first file is playing.. i want the next 5-6 files in order to be downloaded to the client machine (similarly for the other files till all the 100+ are downloaded....) so that the user does not have to wait before each file is played... i have come up with the following code... it downloads the files but they start playing simultaneously... i.e. the audio and the animation of the files overlap.... which should not happen... ideally the files should get downloaded and then when the user clicks on the next button or on end of the movie the next file/movie should start playing.....
the code i have come up with so far is........

var arr:Array = ["01", "02", "03", "04"];

function load() {
for (var i = 0; i<arr.length; i++) {
Loader(i);
}
}
function Loader(movie) {
this.createEmptyMovieClip("movieclip_"+movie, -(movie+1));
eval("movieclip_"+movie).stop();
};



please let me know how to fix the problem of overlapping of the audio and animation.....

Thanks & Regards
Jayan

Loading Multiple Swf Files
Hi,

I have about 100 swf files(containing audio) which will be played based on the user's preference. now what i want to do is when the first file is playing.. i want the next 5-6 files in order to be downloaded to the client machine (similarly for the other files till all the 100+ are downloaded....) so that the user does not have to wait before each file is played... i have come up with the following code... it downloads the files but they start playing simultaneously... i.e. the audio and the animation of the files overlap.... which should not happen... ideally the files should get downloaded and then when the user clicks on the next button or on end of the movie the next file/movie should start playing.....
the code i have come up with so far is........

var arr:Array = ["01", "02", "03", "04"];

function load() {
for (var i = 0; i<arr.length; i++) {
Loader(i);
}
}
function Loader(movie) {
this.createEmptyMovieClip("movieclip_"+movie, -(movie+1));
eval("movieclip_"+movie).stop();
};



please let me know how to fix the problem of overlapping of the audio and animation.....

Thanks & Regards
Jayan

Loading Multiple Files
hey!! I have a bit of a problem. In a website i have 10 buttons and each of them loads an image. the image only loads into a empty movie clip as soon as i press the button.
What i want to try is to start load the images as soon as i enter that page, and I want the buttons to show, only when their image is loaded. Kinda like a progressive thing.
What i have to do?? send each image to a different level when loading?

please somebody help me!!

is there any tutorial about this??

thanks

Loading Multiple Files
hey!! I have a bit of a problem. In a website i have 10 buttons and each of them loads an image. the image only loads into a empty movie clip as soon as i press the button.
What i want to try is to start load the images as soon as i enter that page, and I want the buttons to show, only when their image is loaded. Kinda like a progressive thing.
What i have to do?? send each image to a different level when loading?

please somebody help me!!

is there any tutorial about this??

thanks

Multiple External Files Not Loading On First Try
I need some help, I have 2 swfs being loaded. One is the sound player with a music playlist. The second is the homepage with some text. Each swf loads two separate external text files through LoadVariables. When a user first hits the page, the playlist always loads. But the text for the homepage screen doesn't. If they refresh, both load fine. I'm assuming it's because the playlist is already cached, and now the homepage screen text can load ok.

Can we not load 2 LoadVariables external files to the same Parent timeline at the same time?

I've tried using onClipEvent(load) & onClipEvent(data), and I've tried using the new MX Load component. The behavior repeats under everything I've tried.

Please help!!!

Multiple External Files Not Loading On First Try
I need some help, I have 2 swfs being loaded. One is the sound player with a music playlist. The second is the homepage with some text. Each swf loads two separate external text files through LoadVariables. When a user first hits the page, the playlist always loads. But the text for the homepage screen doesn't. If they refresh, both load fine. I'm assuming it's because the playlist is already cached, and now the homepage screen text can load ok.

Can we not load 2 LoadVariables external files to the same Parent timeline at the same time?

I've tried using onClipEvent(load) & onClipEvent(data), and I've tried using the new MX Load component. The behavior repeats under everything I've tried.

Please help!!!

Loading Multiple External Txt Files
Here is the problem I'm having. I have a page that has multiple txt files loaded into a dynamic box. When I load a file, I can scroll down and read the entire thing. Problem is, when I load the next file, it doesn't load it at the top of the file but rather 1/2 way down. Is there any way to fix this? The example can be seen here:

http://www.thegoheens.com/flash/main.html

It is the "buyers" page. Links on the left, text on the right.

Thanks for the help.

Loading Multiple .swf Files In 1 Preloader
My flash movie consists of a few SWF files piled on top of each other (Levels). But the preloader I'm using loads only the base layer (Level 0). How do I load all the SWFs in one preloader, and please provide tutorials links regarding this too... Thanks

Loading Multiple Files To One Moveclip?
I'm about to load 6400 pictures (8x6px) to my scene.
Using 6400 movieclips will be really slow, so what I want to know is how - if it's even possible - to load multiple pictures to one movieclip?

Thanks in advance

Loading Multiple Fla Files Simultaneously
I' m building a flash based quiz game. Choosing a right or wrong answer plays a flash video file. There are a total of 9 such video files, each 20 sec long.

Can I load all these video files right at the start, before the game loads ? It is very frustrating to click on an answer and wait for a few seconds while the video plays.

/Thanks for your time
Ramki

Loading Multiple Swf Files Containing Objects
Hi there,

I'm pretty new to actionscript.

I have a main fla file, which shows certain characters.
Every time i load the main fla file, 6 characters out of 30 are shown.
Every character contains 3 images, that need to be load in the movie.

Now i thought it was good to make one SWF file for every character, containging just the images for that specific character.
But when i use LoadMovie i'm unable to use the linkange from the character SWF file's library.

How can you target symbols out of a library which was loaded in with Load Movie... ?

Loading Multiple Text Files
Hi! I've got several archived text files - 040107.txt, 040207.txt, 040307.txt, for example - and I want to be able to build a dynamic link which loads whichever file is selected into the Flash movie. This list needs to be able to build itself as I write new files every day and add the old ones to the archive. I'm stumped. How can I do this?

Loading Multiple Files From A Folder
here again,
i m designing a flash AS3 MP3 player. almost done just stuck in exporting content from a whole folder. i know its not simply possible to explore folders in flash but if its possible with some other cheats or migthbe with ADOBE AIR. As far as possible i m goin to make it web Based and last choice is to make a desktop application. so ADOBE AIR is a second choice but still if u know doin it in AIR then i would be extremely grateful.

better if u show me some way that would work in SWF and not require any backend like PHP....
i dont know PHP and have no interest in learning it.

thanks in advance...

Loading Data From Multiple XML Files
I want to load data into a flash movie from two or more different XML files.

I loaded first file with xml.load("myxml.xml")

when i added other xml as same directive as above, it didn't worked.

Please help!

Loading Multiple Swf Files In Main Swf
Hi there,

In my main swf i'm loading multiple swf's. The all have there own holder with different coördinates(x,y).This setup seems to make the hole thing run slow. Any advice on how to make this kind off setup run smooth?

Any way I can preload them and the make them visible one at a time? Like first preload them. swf1 loads first then swf2 after 5sec for instance then after 15sec swf3,...

Any advice,help would be welcome. Hope to here from anyone. Need to get my site to run smooth.

Grtz,

Loading Multiple External Files
I have a timeline where I have external swf files that play in sequence. I need to know how to preload a few of these files at a time so that there is no break between them.

Help W/multiple .txt Files Loading Into Flash
this should be a simple fix - i can't find any thread that has encountered this problem so here goes:

the situation: i have a dynamic text box working correctly: it's a multiple-item menu with a single text box so when you click on one of the four menu items, the respective .txt file content displays in the dynamic text box.

my problem: the first click works - the .txt file displays from the first line (and then however much can be seen in the window). however, if i scroll down through the text (say I scroll halfway through and the uppermost content disappears) and then i click another menu item, the subsequent .txt file displays the new content at the same spot (ie: halfway through the content) so that the first portion of the text is not at the top of the box as you would expect it. if i scroll all the way back to the top and then click another menu item, the .txt file will display the top line(s) of content correctly.

the function works properly in the actual .swf file, but when i play it via the .mov or the .html file output, it doesn't work...

my question: is there a simple 'refresh' function i should be using in the A/S that assures the user will always see the top of the .txt file when clicking a new menu item? my current A/S is simple - each button has the following code with the appropriate .txt file name inserted:

on (release) {
this.loadVariables("text_terms.txt");
}

thanks for any help!
picklewit

Loading Multiple Swf Files Question...
I want to preload ~10 different swf files that represent different UI views in my system. But I am not sure what would be more correct way:

1. To initiate 10 paralel URLRequests and then to wait wor the load message from all of them.
2. To chain the URLRequests in a way that each next starts once the previous has completed.

Might the paralel loads be a problem for slower computers? Will it be quicker to load several in paralel than sequentially?

Thank you in advance.

Loading Multiple .txt Files In A Nested Swf
Hello--
I have a swf (loader.swf) file with multiple buttons, each which loads its own external text file into still another swf with a text box; text.swf & text_txt. This swf will be loaded into main.swf. Since there are so many buttons, I wanted to create a function which would load all the text files with this format:
function loadText(myText:String){
loader = new LoadVars();
loader.onLoad = function() {
_root.text_txt.text = this.myText;
};
bloader.load("folder1/"+myText+".txt");
}

This works when it's hard-coded onto each button, but when the code is encapsulated in the function, I only get UNDEFINED in the text_txt box.

Thanks for any help!

Loading Multiple External .jpg Files
Hi All

I want to load multiple external jpg images in one frame.
This works for one image, i want to load at least 6 images.

_root.createEmptyMovieClip("container",1);
container.loadMovie("photo.jpg");
container._x = 50; container._y = 350 ;

I have created 6 layers and changed the x & Y fot each layer, still i only see the last one.

How to do this right ?

Thanks for any input.

Loading Data From Multiple XML Files
I want to load data into a flash movie from two or more different XML files.

I loaded first file with xml.load("myxml.xml")

when i added other xml as same directive as above, it didn't worked.

Please help!

Loading Multiple .swf Files From The First .swf File
How can I load other .swf files from the first?  For example, I have a root .swf that is the "background" for the website.  Each of the other .swf files are the "content" pages for the site.  The entire site is of course Flash.  I'm using Flash MX 2004 Pro.
Thanks!
SC

[mp3] Loading Multiple External Mp3 Files . . .
Last edited by KenNiles : 2003-12-05 at 10:47.
























ADMIN ---> I'm trying to delete this post. Problem solved.
Sorry!!

Loading Multiple Swf Files Into A Main Movie
I seem to be having difficulties figuring out how I can load a smaller sized swf file into a main movie which is larger in flash 5. I want to load and position the smaller sized swf files in a certain x and y position but it seems to default to the 0, 0 postion on layer 1. I am using load movie then I tried to add set property value to x and y but that seemed to shift the main movie.
Basically I have a TV screen on the main movie and want to load and unload different swf files as I change the channel. Could anyone help me with this

Loading Multiple External Files - PROBLEM
i am trying to create a preloader of sorts.

i have a mx file that has many "screens" - each screen loads in both an external jpg and mp3. in addition we are loading an internal movie clip that has some animations that occur on top of the jpg file.

the problem is that the audio is streaming in and the internal movie clip is going threw its movements, but the jpg file is not always fully loaded by the time the audio and animations start.

i am trying to create a function that checks to see if the jpg is fully loaded and displayed on the screen before the other two parts start playing.


does anyone have any ideas??


thanks in advance!!

Problem Loading Multiple Xml Files To ListBox
first of all hi i'm a newbie to the forum but i hope you wont hold that against me ...

I am making a media player that loads external mp3s and swfs from xml files. All's going fabulously but i have a hurdle i can't jump

I have multiple xml files (songbook 1 and 2) that tell flash the trackname,artist, url etc in the chosen songbook and loads into a listBox componant. I can target the two xml files from a variable whichsongbook activated by two different buttons great!, however...

instead of it replacing the items in the listBox with the new xml songbook, it adds them along with the old ones....

is there an easy way of clearing the listBox componant or reseting the xml b4 loading the new one?

thanks for your time

Loading And Unloading External Multiple Files
Could you please help/advise on the best way to ensure smooth fuctionalitty and continuity. I have a number of external .swf files that I want to call at various times. I've created a button with an "on release load movie" e.g. Hello.swf into level 0. It works up to a point, but then ceases to respond. We think its a caching issue. So what would be the best way of going about getting external files. I have just tried assigning each one a different level, and unloading all others when I call the one i want, but that's not working at all. help....help!

Problem With Loading Multiple External Xml Files
I have an array named 'source' which consists of external xml file names whose content i am trying to load into another array called 'content'. I tried with following:


Code:
.....
for (i=0; i<source.length; i++){
XML_URL = "http://localhost/temp/" + source[i];
myXMLURL = new URLRequest (XML_URL);
myLoader = new URLLoader (myXMLURL);
myLoader.addEventListener(Event.COMPLETE, xmlLoaded);
}
....
function xmlLoaded(evt:Event):void{
content.push(myLoader.data);
}
The problem is that this way i only get content of the last xml file and other 'content' elements are 'undefined'. Does anyone know solution to this problem or maybe have another way of doing this?

thanks in advance

Loading Screen For Multiple Music Files
I'm creating a game that has lots of differant background music for differant types of level.

However on the begining pre-loader I want to have seperate loading bar for the sounds. (bar 1 is move preloader and bar 2 is the sounds preloader).

I had the idea of adding all the getBytesTotal() from the music files at the start and have a variable that constantly upadtes with all the getBytesLoaded() added together, then I add the usual divide total by loaded and times my 100 then round.
That code is as follows:

Code:
onClipEvent(load) {
totalBytes = 0;
loadedBytes = 0;
loadedPercentage = 0;
for(var i = 0; i < 5; i ++) {
_root["bgSound"+i] = new Sound();
_root["bgSound"+i].loadSound("mp3/music"+i+".mp3");
totalBytes += _root["bgSound"+i].getBytesTotal();
}
}
onClipEvent(enterFrame) {
loadedBytes = 0;
for(var n = 0; n < 5; n ++) {
loadedBytes += _root["bgSound"+n].getBytesLoaded();
}
loadedPercentage = (loadedBytes/totalBytes)*100;
loadedPercentage = Math.round(loadedPercentage);
_root.displayText = "Loaded Music: "+loadedPercentage+"%";
}
But what I really want to find out is how can I say also how many files have completely loaded out of hte total eg:

Code:
displayText = "Loaded Music Files: "+filesLoaded+"/"+filesTotal;
displayText += "
Loaded Mus... etc
Is it possible using the code that I have, to actually say how many files have loaded as well as the overall percentage??

thanks anyone that can help

Multiple LoadMovies Loading Random Files
I'm trying to load 2 sets of random files using the loadMovie function, but I can't get it to work.

Sorry to bug you guys/girls about such a simple thing, but I'm completely inept when it comes to programming anything.

So, here are the files I have:
character1.swf - character8.swf
background1.swf - background3.swf

I want it to randomly pick one of my Character files and place it above a randomly picked Background file.

Here's what I have so far:


Code:
char=random(8)+1;
charfilename="character"+char+".swf";
loadMovie(charfilename, _root);
bg=random(2)+1;
bgfilename="background"+bg+".swf";
loadMovie(bgfilename, _root);
I know that having both go to _root is probably one of my problems, but when I try to put them on different layers, it doesn't work. Like this:


Code:
char=random(8)+1;
charfilename="character"+char+".swf";
loadMovie(charfilename, 200);
bg=random(2)+1;
bgfilename="background"+bg+".swf";
loadMovie(bgfilename, 100);
Thanks for any help you can give.

Loading Multiple Xml Files Then Reading A Node Out Of Each
Hi guys

this is really getting to me now!!! Im loading multiple files into flash, not a problem but when i try and get the value out of a specific node in each xml im not getting it, please help!!

I think im just been a idiot on this one, so here is the code im using:






Code:
files = new Array();
lv = new LoadVars();

lv.onLoad = function() {
fl = this.filelist;
files = fl.split(",");
init ();


}
function init ()
{
for ( var i = 0; i < 6; i++ )
{
var loadThisData:String = "http://www.nfinityx.com/Item/readwrite/"+files[i]+"";
var regionData:XML = new XML ();
regionData.ignoreWhite = true;
regionData.load ( loadThisData );
regionData.onLoad = tracethedamnthing;
trace ( loadThisData);
}
}
function tracethedamnthing ( success )
{
if ( success )
{
_root.files.push( this );
trace ( _root.files[1] );
var base = regionData.firstChild.childNodes;
loops = base[0].childNodes[0];
trace(loops);
}
}

Loading Multiple Text Files On ROLL_OVER
ok.. I have many button.. they all need to load different external text files when user does a ROLL_OVER. I have managed to get it to not error with fairly cludgy code (I know I can make this much nicer, as I am resuseing so much code.. I just dont know how). However when I run the as file.. it doesnt load the external text, but also doesnt error..

Note the dynamic text box "brand_txt_box1(and 2)" is inside a movie clip, but I put test_txt_box1 (and 2) on th main stage just to be sure it wasnt a child issue.


ActionScript Code:
package {

    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.text.TextField;
    import flash.display.SimpleButton;
   
   
    public class market_process extends MovieClip {


        public function market_process() {
            trace("this is working");
            //brand_box1.brand_txt_box1.visible = false;
            //brand_box2.brand_txt_box2.visible = false;
           
            brand_btn.addEventListener(MouseEvent.ROLL_OVER, beginButtonOver);
            brand_btn.addEventListener(MouseEvent.ROLL_OUT, beginButtonOut);

            targetComp_btn.addEventListener(MouseEvent.ROLL_OVER, targetCompButtonOver);
            targetComp_btn.addEventListener(MouseEvent.ROLL_OUT, targetCompButtonOut);
            //Many More Buttons (total 14)

       
        }
        private function textLoadvaribles() {
            // I included only 2 of each, though I have 14 of each.. 2 textboxes for each button

            var brand_txt1_req:URLRequest = new URLRequest("textfiles/1.txt");
            var brand_txt2_req:URLRequest = new URLRequest("textfiles/2.txt");
       
           
            var brand_txt1_2_req:URLRequest = new URLRequest("textfiles/1_2.txt");
            var brand_txt2_2_req:URLRequest = new URLRequest("textfiles/2_2.txt");
           
           
            var brand_txt1_load:URLLoader = new URLLoader();
            var brand_txt2_load:URLLoader = new URLLoader();
       
           
            var brand_txt1_2_load:URLLoader = new URLLoader();
            var brand_txt2_2_load:URLLoader = new URLLoader();



            brand_txt1_load.load(brand_txt1_req);
            brand_txt2_load.load(brand_txt2_req);
       
           
            brand_txt1_2_load.load(brand_txt1_2_req);
            brand_txt2_2_load.load(brand_txt2_2_req);
       
           


            brand_txt1_load.addEventListener(Event.COMPLETE, brand_txtReady1);
            brand_txt2_load.addEventListener(Event.COMPLETE, brand_txtReady2);
       
           
            brand_txt1_2_load.addEventListener(Event.COMPLETE, brand_txtReady1_2);
            brand_txt2_2_load.addEventListener(Event.COMPLETE, brand_txtReady2_2);
       
           
        }

        private function brand_txtReady1(event:Event):void {
            brand_box1.brand_txt_box1.text = event.target.data;
            test_txt_box1.text = event.target.data;
        }
        private function brand_txtReady2(event:Event):void {
            test_txt_box2.text = event.target.data;
        }
   
       
       
        private function brand_txtReady1_2(event:Event):void {
            brand_box2.brand_txt_box2.text = event.target.data;
            test_txt_box2.text = event.target.data;
        }
        private function brand_txtReady2_2(event:Event):void {
            test_txt_box2.text = event.target.data;
        }
   
       
       
        //End Text Loader

       
    }
}

Loading Multiple Txt Files W/ One LoadVars Object?
Basically, my question is: is it possible to load multiple files using only one loadVars object? Here's what i've got



Code:
_root.data_list = new LoadVars();
_root.data_list.load("city_usa.txt");
_root.data_list.load("state_usa.txt");

_root.data_list.onLoad = function(success) {

data_string = _root.data_list.toString();
//split the string into an array
_root.data_array = data_string.split("%0D%0A");
type = _root.data_array.shift();

//get the subdivisions of the list
_root.data_subsets = _root.find_subdivisions(data_array, n_divisions);

listString = _root.data_subsets.join("
");

if(type == "city") {
_root.cityListMC.textBox.text = listString;
}
else if(type == "street") {
_root.streetListMC.streetListBox.text = listString;
}

};

what ends up happening is that my cities display correctly, but when it goes through and does states, the cities are appended to the end of the string data_list. is there any way to clear the loadVars object between loads or do i need to make a different loadVars for each txt file? i've also got to do streets, countries, etc, so i'd prefer to have only one object and one onLoad method.

thanks
em

Loading Multiple Swf Files While Movie Plays
I have a project where I am loading ~50 swf files while the movie plays. The problem I am experiencing is that Flash downloads more than on file at the same time and because some files are larger than others, they do not seem to load sequentially. Does anyone know how to limit the way Flash loads each swf?

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();

Loading Multiple External Movie Files
Hello,

I have been working on this script that currently loads 2 external files into two separate areas inside my application. the 2nd file loaded is supposed to have several buttons that control the 1st movie clip. Like go to next frame, etc. My problem now is the 2nd file loaded, is not controlling the 1st anymore ( i had this all sitting in one file before).

So the action script to load the files is;


Code:
this.myBtn.onRelease = function() {
//load render 1 into viewer
this._parent.viewer.createEmptyMovieClip("clipHold", this.getNextHighestDepth());
this._parent.viewer.clipHold.loadMovie("render1.swf");
this._parent.imageName = "3600 RIO";

//load panel swatches
this._parent.panel.createEmptyMovieClip("clipPanel", this.getNextHighestDepth());
this._parent.panel.clipPanel.loadMovie("panel.swf");
};
and in the Panel, are a series of buttons, which shold affect the render.swf. This code is;


Code:

//panel color swatches

this.one.onRelease = function() {
this._parent.viewer.clipHold.gotoAndStop("gray");
};
this.two.onRelease = function() {
this._parent.viewer.clipHold.gotoAndStop("purple");
};
this.three.onRelease = function() {
this._parent.viewer.clipHold.gotoAndStop("brown");
};
I have tried to point the panel colors to the main movie, but its still doesnt work. Any ideas?

Cheers

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