Ok, so here’s my problem
I’ve used the tutorial here:
http://www.kirupa.com/developer/actionscript/moviecliploader.htm
to create a preloader for my external images… But i have a biiiiig problem
The preloader work extra-fine with .jpegs from the http:// but when i try to use the preloader for a file on my hdd… and after i enable the Simulate Download feature it seems like thing go really crazy… Because the trace actions say the jpg is loaded… But in the main stage, it takes some time for the image to appear… Dunno what this means, and i thought that some of you might know
Here’s the code
bar._visible = false;
border._visible = false;
var preload:Object = new Object();
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
bar._visible = true;
border._visible = true;
pText._visible = true;
};
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
bar._width = (lBytes/tBytes)*100;
pText.text = "% "+Math.round((lBytes/tBytes)*100);
};
preload.onLoadComplete = function(targetMC) {
border._visible = false;
bar._visible = false;
dText._visible = false;
trace(targetMC+" finished");
};
this.createEmptyMovieClip("container", "100");
container._x = 0;
container._y = 0;
var my_mc:MovieClipLoader = new MovieClipLoader();
my_mc.addListener(preload);
//default image
my_mc.loadClip("0.jpg", "container");
//buttons
button1.onPress = function() {
my_mc.loadClip("1.jpg", "container");
};
button2.onPress = function() {
my_mc.loadClip("2.jpg", "container");
};
button3.onPress = function() {
my_mc.loadClip("3.jpg", "container");
};
I have to say again the preloader works fine with the http:// posted jpegs but not at all with the local jpegs…
the output is: started loading _level0.container
_level0.container finished
Both lines appear instantly and the image loads only after a few seconds… with the Simulate Download enabled…
Thx in advance for the help
PS: If i use a loadMovie action for loading a jpg, is there any way to create a preloader for that without the MovieClipLoader class? thx again