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








Preload External Files


Hi y´all!

I am trying to preload an external file containing my sound but it is not working.

Here is my code:

frame 5(after my main preloader)

loadMovie("sound.swf",1);
var loaded : Number = _level1.getBytesLoaded() / _level1.getTotalBytes();
bar._width = loaded * 100;

frame 6
if(_level1.getBytesLoaded == _level1.getTotalBytes()) {
gotoAndPlay(7);
}
else{
gotoAndPlay(5);}

what am I doing wrong?




Ultrashock Forums > Flash > Flash Professional
Posted on: 2005-09-27


View Complete Forum Thread with Replies

Sponsored Links:

How To Preload External .swf Files?
I've looked through numerous tutorials and newsgroup archives now but can't find anything that specifically answers my problem, or at least that I can understand well.

I have a percentage preloader which calculates percentage loaded, bytes loaded and has a loadbar etc. It uses 2 scenes, the 1st scene is the preload code and the 2nd scene is the content.

I have 2 movies, the 1st is an intro and the second is my main site. The intro is just one movie (eg intro.swf) that is replaced by the 2nd (eg homepage.swf) after it ends.

The preloader works fine for the intro.swf but not for the homepage.swf. The main difference between the 2 movies is that the main site is just a blank one frame movie that loads in all the other elements, such as navigation & visual elements etc, as separate swf files.

I used the following preload code:

total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Scene 2", 1) {
gotoAndPlay ("Scene 2", 1);
}

All that happens (when I test on the web)is that the preload bar flashes up for a second then a blank screen appears and the browser eventually crashes.

I'm not sure whether I need to add relative paths to each of the separate swf's that I'm trying to load in (there's about 8 in all). And if so how to do this.

Could someone tell me if this is what I need to do or if I'm missing something here.

Thanks for your patience.

View Replies !    View Related
Preload External Swf-files
Hi board!
I´m trying to preload external swf-files from my main movie, but I don´t know how to do it.

Can anybody help me, plase???

View Replies !    View Related
Preload External Swf Files
hello, i know, i know, the preload thing has been talk to death in just about any flash forum, but still, i just can not get this damb thing to work.
i'm trying to preload an external swf file on mouse klick into an empty movieclip. the loaded swf contaions noting but a sound lood and play once it has fully loaded. ive trying getBytesLoaded/Total, ive tried _framesloaded etc, ive tried ifFrameLoaded, but i just can not get monitor the load the movie clip.

PLEASE HELP, THIS THING IS KILLING ME................................................ .................................................. .................................................. .................................................. ..........

View Replies !    View Related
Preload External F4v Files?
n00b alert... I did search the forums, but either the code got too complicated for me to even attempt to adjust it, or I didn't find a relevant answer.
So I hope someone here can help me out.

I've found a preloader code online that works like a charm. I don't really know what half of it actually means/does, but it preloads and then plays the mainfile.swf and that was all I cared about.


ActionScript Code:
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("mainfile.swf"));

function loop(e:ProgressEvent):void
{
    var perc:Number = e.bytesLoaded / e.bytesTotal;
    percent.text = Math.ceil(perc*100).toString() + "%";
}

function done(e:Event):void
{
    removeChildAt(0);
    percent = null;
    addChild(l);
}

But the "mainfile.swf" calls external f4v files, and the problem is that they do not get preloaded. (And that kinda was why I needed a preloader in the first place...)

I gave all the f4v files instance names within the mainfile (assume: video01.f4v, video02.f4v etc), and the f4v files themselves are in the same folder as the mainfile.swf.

What do I need to add to the code to get it to preload everything?

Thanks in advance!!

View Replies !    View Related
Preload External .flv Files
I have had the hardest time trying to get help with this!..

I have a number of .flv files that I need to play in succession.. I am using the mediaPlayback component in flash.

When Vid1 is done, I am using the mycomponent.setMedia command to call up and play Vid2, which works fine.. The flv's are not streaming, they are local to the main flash file so they play over http.

What I want to do is, when Vid1 is fully loaded and playing, I want to preload Vid2, when Vid2 is playing, preload Vid3 and so on.

Below is my script - the second paragraph is where I attempt to preload the next file. It is not working... Please help!

ActionScript Code:
// Check progress of currently playing .flv
var netDone:Boolean = false;
checkProgress = function (myVidObj) {
var mybytesLoaded = myVidObj.bytesLoaded;
var mybytesTotal = myVidObj.bytesTotal;
var mypercentLoaded = Math.floor(mybytesLoaded/mybytesTotal*100);
if (mybytesLoaded == mybytesTotal) {
netDone = true;
trace("netDone = "+netDone);
clearInterval(poll);
}
trace("mybytesLoaded = "+mybytesLoaded+", mybytesTotal = "+mybytesTotal);
trace("%"+mypercentLoaded+" loaded.");
};
var poll = setInterval(checkProgress, 1000, video_cpnt);
trace(poll);

// if currently playing file is loaded, preload next file
if (netDone) {
preLoader_mp.setMedia("VideoPieces/02.flv");
var poll = setInterval(checkProgress, 1000, preLoader_mp);
}

// if current file has reached end, point component to next one
var listenForEnd = new Object();
var mediaNum:Number = 2;
listenForEnd.complete = function(eventObject) {
if (mediaNum<10) {
video_cpnt.setMedia("VideoPieces/"+"0"+mediaNum+".flv");
} else {
video_cpnt.setMedia("VideoPieces/"+mediaNum+".flv");
}
video_cpnt.play();
mediaNum++;
trace("mediaNum = "+mediaNum);
};
video_cpnt.addEventListener("complete", listenForEnd);

View Replies !    View Related
Preload External .swf Files
I'm sure this has been addressed before, but I can't really figure out how to apply the tutorials to my case, what I need is very simple, I have a number of buttons that load external .swf files into an existing movie clip instance

like this:

on (rollOver) {
loadMovie("1.swf", "container");
container._x = 0 ;
container._y = 0 ;
}

and this:

on (release) {
loadMovie("1.1d.swf", "content1d");
content1d._x = 0 ;
content1d._y = 0 ;
}


I don't want to have to change those actions, I just want something very simple to preload all of those .swf files into the cache, at the beginning of the main movie, while a simple "loading" screen displays, progress would be nice but not essential.... and then once the movie starts all the external .swf files will be cached and the rollovers and clicks will produce instantaneous loading

this should be pretty simple, like just loading them all at once off the stage where they can't be seen, but I'm a beginner and don't really know how to go about it, and don't have so much time for trial and error

thanks in advance!

View Replies !    View Related
Preload External Files
Hi,

Can anyone give me a tip, in how to make a preload of an external loaded file?

I've got a movieclip that will load the external file, with the command:

container.loadmovie("nameofthefile.swf");

Since the file, is a little heavym i need to make a preload to make it run. The problem is, if I include a preload in the external file, the file when loaded will go to frame 1 of the main movie.

I still didn't catch a way to make this work. Anyone can give me a hand with this please?

All the best.

View Replies !    View Related
Preload External FileS To SWF
Hey everyone,

I'm trying to load up 5 swf files into the first frame so that it can be accessed without it trying to retrieve at a later time. Is that possible?

I ask because I made a swf file that loads swfs from a CD rom and would love to prevent the drive from being accessed over and over again and waiting for it to read/load.

Any comments are greatly appreciated!

View Replies !    View Related
How 2 Preload External SWF Files = ?
I think what I'm trying to is quite simple...however I'm going crazy in the process.

I have an external swf file that I want to load into my main scene through a loadMovie script. But when I click the link to activate the loadMovie action it seems to want to ignore my preloader at the beginning of my external swf and go straight to displaying the picture. So, then when i upload it to my server my site will be blank unitl my picture loads. can anyone help me?

I've searched long and hard for a tutorial on the web but came up short. If you know of one, please help.

View Replies !    View Related
Is There Anyway To Preload External Text Files?
I want to use the external text file method for displaying information because its sooper easy to update and implement. The only thing I dont like is the fact that they take a few seconds to load, so theres a ten second lag time after the user clicks before the text is viewable. Is there anyway to preload the text files as well as the movie itself? Any help would be appreciated.
Thanks
-MapexMitch

View Replies !    View Related
Is There A Way To Preload External Flash Files
I what to do a percentage preload on a external movie that will be loaded into the main I have tried putting a button on the main with this script on (release) {loadMovie("external_movie.swf","_level1"); it seem to work but the preloader is skipped and the image just shows up here is the script for the external file // Specify how many frames to load before playing.var loadAmount = _totalframes; // If the required number of frames have finished loading...if (_framesloaded == loadAmount) {// ...start the movie gotoAndPlay("beginMovie"); } else { // ...otherwise, display the load status // then go back and check load progress again. // First, determine the loaded and total kilobytes.loaded = Math.round(getBytesLoaded() / 1024);total = Math.round(getBytesTotal() / 1024); percent = Math.round((loaded/total) * 100); // Display the loaded kb, total kb, and percentage of // kb loaded in text fields.bytesLoadedOutput = loaded; bytesTotalOutput = total; percentOutput = percent + "%";
// Set the width of the loadBar to a percentage of // the loadBarHousing. loadBar._width = loadBarHousing._width * (percent / 100); // Now go back and check load progress.gotoAndPlay("loading");
[Edited by montara on 03-04-2002 at 03:16 AM]

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
Preload Indicator For External Swf Files
Question about preloading external SWF, jpg or any other file.
if I have a swf file that would load some external photos, like phot albums, is there a way to show a preloading screen to user until the external swf loads?

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
Gparis I Tried Your Preloader And It Still Does Not Preload External Files
I,m trying to preload external flash files and I can't seem to get it to work why?? someone has to know a effective way to do this out there?

View Replies !    View Related
Preload External Files And Still Be Able To Auto Resize?
I have been reading all of the posts on both auto resizing a window for an image gallery as well as the threads on preloading external files...is there anyway to encorporate both?...

example: when I click a portfolio button, an MC slides out and multiple progress bars start to load external files. when they have loaded and you click on the buttons they will auto resize the images borders accordingly.

Anyone have any ideas?

View Replies !    View Related
Preload External Files And Still Be Able To Auto Resize?
I have been reading all of the posts on both auto resizing a window for an image gallery as well as the threads on preloading external files...is there anyway to encorporate both?...

example: when I click a portfolio button, an MC slides out and multiple progress bars start to load external files. when they have loaded and you click on the buttons they will auto resize the images borders accordingly.

Anyone have any ideas?

View Replies !    View Related
Preloader To Also Preload External F4v Files In Main Movie?
n00b alert... I did search the forum (and several others online), but either the code got too complicated for me to even attempt to adjust it, or I didn't find a relevant answer.
So I really hope someone here can help me out.

I've found a preloader code online that works like a charm. I don't really know what half of it actually means/does, but it preloads and then plays the mainfile.swf . Me happy.

But the "mainfile.swf" calls external f4v files, and the problem is that they do not get preloaded. (And that kinda was why I needed a preloader in the first place...)

I gave all the f4v files instance names within the mainfile (assume: video01.f4v, video02.f4v etc), and the f4v files themselves are in the same folder as the mainfile.swf.

What do I need to add to the code to get it to preload everything?
Thanks in advance!!


ActionScript Code of my preloader is attached.







Attach Code

var l:Loader = new Loader(); l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop); l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("mainfile.swf"));

function loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString() + "%";
}

function done(e:Event):void
{
removeChildAt(0);
percent = null;
addChild(l);
}

View Replies !    View Related
HOW TO PRELOAD MY MAIN SWF (not External Files But My Main)
I've done a main.swf that i use as a big container for my website, in this main.swf i used the document class, where i import all the classes that i need for my interface and i load all the sections from externals .swf, preload this sections is not a problem, but i have this problem: how can i preload my main.swf if i have to put the code for the preloading into the document class, that is not working till its loading is not complete!?!?!? i mean it is like to say to the same object that i'm loading to check the loading of itself, the methods aren't be instanced, so.. looks not possibile to me.. wich way to follow?

View Replies !    View Related
Can I Preload A Swf And Also Preload An External Linked Swf With The Same Preloader?
Can i preload a swf and also preload an external linked swf with the same preloader?

i have one swf which is a site!

and one that is the music!!

but i want them both loaded together so they run at the same time??

this possible??

View Replies !    View Related
Preload External Swf Movies In One Preload ?
So, I take it there is no way to preload external swf movies in one initial preload?

does anybody have a clue or suggestion?

thanks.

View Replies !    View Related
Preload Txt Files?
In my flash file, I have a scrollbar component pulling text from a txt file. When I view my swf over the internet, sometimes it is slow to display the text inside of the scrollbar text area.

Is there a way to correct this slow lag time? Perhaps preload the txt files somehow?

I appreciate any tips you have for me. Thanks.


-------------
The actionscript I am using to pull the text from the txt file is:
loadText = new LoadVars();
loadText.load("project_text.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.projecttext;
};

View Replies !    View Related
Preload Flv Files
Hi All,

Im working on some movieclip which needs to play 2 flv (moviefiles).

The first one should be a small file, about 10 seconds (some guy introducing you with your name like 'Hi Tom ... ') and then the 2nd one should start with the normal video message which is a bit larger about 7MB's.

These 2 movies needs to play without a struggle or a break between them, so it seems to the user only 1 movie is playing.

My question therefore is:

Is it possible to preload 1 (external) flv file while playing the other? I want to use only 1 mediacomponent..

Here you can find what i have now.. It works, but you still have a little pause between the movies...

http://www.xs4all.nl/~joan/temp/vidtest/

Fla, Swf and flv files are there.. offcoarse this are only stupid test video's of my coworkers hehe..

Anyone got an idea??

View Replies !    View Related
Want To Preload Swf Files
I am working on a flash page that uses a couple of swf files that are 500-800k. I would like to pre-load them while the user is looking at the main page and then when a button is click to play them.

I am using Flash MX 2004 and am pretty much a novice. Currently I am using the "loadmovienum" command to load then upon demand. Is there a better way to do this?

Thanks in advance

Steve

View Replies !    View Related
Can You Preload Txt Files?
In my flash file, I have a scrollbar component pulling text from a txt file. When I view my swf over the internet, sometimes it is slow to display the text inside of the scrollbar text area.

Is there a way to correct this slow lag time? Perhaps preload the txt files somehow?

I appreciate any tips you have for me. Thanks.


-------------
The actionscript I am using to pull the text from the txt file is:
loadText = new LoadVars();
loadText.load("project_text.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.projecttext;
};

View Replies !    View Related
Preload JPG/PNG Files Into A MC
I am currently using a simple load movie command to load my png images into a movieclip ...

_root.myMovieClip.loadMovie("pc1.png");

Is there a way to load these images while my main swf file loads? There is a delay before the pictures show up because they load right as I go to that movieclip...if anyone can help, I would greatly appreciate it...

View Replies !    View Related
Preload .txt & .xml Files?
Hey,

I am wanting to know how to preload my .txt and .xml files at the begining of my movie..So intergrate it with my main preloader..Any One know??

View Replies !    View Related
Preload Many Flv-files
Hello!
I´ve making an interactive video application and need to preload more than one video clip. Any one who has a good solution on that?

View Replies !    View Related
Can You Preload Txt Files?
In my flash file, I have a scrollbar component pulling text from a txt file. When I view my swf over the internet, sometimes it is slow to display the text inside of the scrollbar text area.

Is there a way to correct this slow lag time? Perhaps preload the txt files somehow?

I appreciate any tips you have for me. Thanks.


-------------
The actionscript I am using to pull the text from the txt file is:
loadText = new LoadVars();
loadText.load("project_text.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.projecttext;
};

View Replies !    View Related
How To Preload Variables From TXT Files?
I made up the next code:

frame (1)
loadVariables(_level0.myVars, _root.varsHold);

frame (2)
lFrames = _root.varsHold._framesloaded;
tFrames = _root.varsHold._totalframes;

frame (3)
if (lFrames == tFrames) {
gotoAndPlay(4);
} else {
gotoAndPlay(2);
}

View Replies !    View Related
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
Top Load Or Preload Swf Files
Hi - I have another AS2 question as Im not very good and can't seem to get it cracked. I have a flash site (main.swf) that has 2 stage intro's (intro.swf & enter.swf), because of the file sizes I need to preload or topload them as the previous one plays. eg. after intro.swf has loaded and starts playing I need enter.swf to load and pause until intro.swf has played out and when enter.swf is playing I need main.swf to load - so to achieve an almost seamless animation through the intros to the main site but still keeping the quality of the animations (large file size 3d animations).
Is this possible - I've had a look at some samples on flashkit.com but none seem to have the desired effect.
Thanx in advance for any input.
Cheers
D

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 Files Without Preloader.....
Hi all,

How can I preload multiple external files while the viewer looking at the other sections but not showing them until viewer clicks on of the coresponding buttons?

View Replies !    View Related
How To Preload Jpegs Files From Xml
i'm looking for a way to preload jpegs from an xml files out of flash. I can load them in my flash; but until now i can find a way to use a loadbar that indicate that files are laoding
any one can help?

View Replies !    View Related
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?

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 MP# Files From XML Playlist
Hey All!

I am working on a mp3 player based on Lees tutorials. I would like to preload each song before they play just dont how to implement that. Help is always appreciated.

View Replies !    View Related
Preload Problems: Video Files In MX
I have found that my preloaders are not working when I have video files.

I have been trying to use my normal preload code for new Flash MX movies which are mostly video in their file size. I find that the preloader works fine both using the frames loaded method and the bytes loaded methods in MX until I introduce video files. The video files seem to disable the code (the preloader stops working).

Am I doing something unusual? Is anyone else experiencing this?

Thanks for any help.
Tom Blaxland

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 Problems With Jpg Files Called From Xml
Hi,
Im having a little problem with a preloader, it will jump from 0-100.
The script im using or making loads jpg's from xml, the images load when the loader gets to 100 but i can't work out why it jumps.
any help would be welcome

yours agent_ toto

View Replies !    View Related
Do You Make Seperate Files So You Can Preload?
The last few times Ive made things in flash they havent been for the web and the only time I made a preloader was just to load a movie. I am making a website now and Ive forgotten the best workflow and way to structure it. Do you make seperate swf files for each part you want to load? You dont make everything in the same swf for websites that want to preload do you?

View Replies !    View Related
Preload Of Multiples FLV Files At The Same Time
Hello,
I have 5 FLV videos in a flash sequence that plays at the same time.
I'd like to create a script in order to stop the sequence until all the FLV files are entirely preloaded. I found many tutorials for preloaders but I don't know how to preload more than one file.

Apologies for my english.

thanks everybody!

View Replies !    View Related
Preload Multiples Files Into Browser
Hi,

I have a script to preload single files, what about multiple files (5/6 xml files);
Preferably with a preload bar

View Replies !    View Related
Is It True You Cant Preload Local Files?
Morning All,

I recently came across a few other forums that say it is impossible to preload local files with either a progress bar or by removing an animated child on the load.COMPLETE event listener. (Actually everything on the screen remains idle until the local swf im loading, loads) I know my code is correct because when putting an internaet image URL in, the progress bar works a dream.

Can anyone confirm this and better still is there any way of preloading a local file?

View Replies !    View Related
Preload Bar Not Workin With Xternal Files~Help Please
I've been stuck on this problem for awhile, any help greatly appreciated.

I'm loading external jpegs into a MC and want a progress bar to show how much of the file has been loaded. This is the script for the preloader:

p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
trace("filesize =" + filesize);
trace("loaded =" + loaded);
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};



The preload bar never shows up at all, I get a blank screen until the image is fully loaded and then it fades in.

What I don't understand is that this is the result of the trace command:
filesize =4
loaded =4
filesize =4
loaded =4
filesize =4
loaded =4
filesize =-1
loaded =0
filesize =2431002
loaded =2431002
ad infinitum

Here I was using a 2.4 meg jpeg.
Why does filesize = 4?
then jump to : -1 / 0
Then jump to 2431002 2431002?


Any help greatly appreciated. I've gotten all of my site basically figured out but have been wasting A LOT of hours trying to get this to work before I can finish it.

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
[F8] Pls Help Friends..How To Preload Two Seperate Swf Files In Onetime?
hello dears, I have two swf files. its actuallly for a portfolio...one is intro animation and another one is portfolio..each 1.5mb approx. both has preloader and in seperate html pages..After completing the intro-animation portfoliohtmlpage will start to load...Prob is nobody wont wait 4 this both preloading process..
How can i preload portfoliohtml in background, when the intro is playing..?
this is the link now i have made:
introanimation

thanks

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
Copyright © 2005-08 www.BigResource.com, All rights reserved