I have a main file which calls the external SWF file on mouse over actions.
Within those External SWFs the images are coming through the XML file one by one. Each time the movie clip which was empty initially, loads the image from the local folder according to the path coming from the XML, but how can i show the loading bar before each image loads so in this way even if some one is using low bandwidth internet speed he can see atleast some loading bar instead of blank area.
I have attached the files in a zip folder so that any one can understand the whole thing. Any help would be really appreciated.
Thanks
F.
fahad.bhatti@gmail.com
I won't change directions and i won't change my mind, How much difference does it made?
I didn't had a look into your zip file,
but i guess you will most likely want to use the MovieClipLoader class..
Here a simple example how to track loaded bytes from Flash Help:
Code:
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
trace(target + ".onLoadProgress with " + bytesLoaded + " bytes of " + bytesTotal);
}
listener.onLoadInit = function(target:MovieClip):Void {
trace(target + ".onLoadInit");
}
mcLoader.addListener(listener);
mcLoader.loadClip("http://www.w3.org/Icons/w3c_main.png", container);
My letters on the F1 key have faded, how are yours today?
I have applied your code on a blank frame of a blank Flash file and gave the URL of a high res image online, even after that upload when i check online i couldnt see anything for a minute then i recieve the image at once.
I am attaching the code on which i am loading the "galeria.XML" file which sends the path for images in an MC instance named "imagem", Please check if you could apply the loading bar in that "imagem" so that it shows some loading progress while the image is loading. Your help will be really appreciated.
Here is the code:
Code:
System.useCodepage = true;
if (i < 0) {
i = 0
}
var meuXML:XML = new XML();
meuXML.load("galeria.xml");
meuXML.ignoreWhite = true;
meuXML.onLoad = function(){
img = this.childNodes[i].childNodes[0].childNodes
texto1.text = this.childNodes[i].childNodes[1].childNodes
fidi.text = this.childNodes[i].childNodes[2].childNodes
cont = this.childNodes.length;
loadMovie(img, "imagem");
}
if ( i == cont){
i = i-1
}
You will see a button in flash file "MUSIC.FLA". That button showuld have the urls on its GETURL action coming from the XML file along with each record, can you do that as well please. In this way everything will be solved and my project will be finished technically.
Salute & Best Regards
F.
fahad.bhatti@gmail.com
I won't change directions and i won't change my mind, How much difference does it made?
Thanks mate, i have checked the file you sent but it is not showing any loading for the images, or maybe i have messed up with the fla file again, if i couldnt manage with the images loader thing then iw ill keep them wihtout it as before coz they will be very small in size anyways.
But teh other thing which i am stuck out now is the URL of the button in flash to be changed according to the XML file, Can you do any help in that as well please?
Regards
F.
fahad.bhatti@gmail.com
I won't change directions and i won't change my mind, How much difference does it made?