julia
1
hello!
i’m posting my fla in case a Flash Guardian Angel wishes to help me.
i just need a preloader for my dynamically loading jpgs.
fyi, i don’t need buttons or anything for this…it’s a very simple slideshow where the images come in every 100 frames…that’s it.
does anyone know what code i should put it so that my images will preload at the beginning so the slideshow doesn’t stutter?
thank you!!
julia
system
2
[AS]var first = 1;//first pic
var last = 5;//last pic
var whichPic = 1;
var depth = 100;
MovieClip.prototype.preload = function(picture) {
this.createEmptyMovieClip(“holder”, depth);
holder.loadMovie(picture);
this.onEnterFrame = function() {
var bytesLoaded = holder.getBytesLoaded();
var bytesTotal = holder.getBytesTotal();
var percent = Math.round(bytesLoaded/bytesTotal)*100;
myText.text = percent+" %";
if (bytesLoaded>0 && bytesLoaded>=bytesTotal) {
content_mc.loadMovie(picture);
myText.text = picture;
delete this.onEnterFrame;
}
};
};
back = function() {
whichPic–;
if (whichPic>=first) {
preload(whichPic+".jpg");
} else {
whichPic = first;
}
};
next = function() {
whichPic++;
if (whichPic<=last) {
preload(whichPic+".jpg");
} else {
whichPic = last;
}
};
backbutton.onPress = function() {
back();
};
nextbutton.onPress = function() {
next();
};
this.createEmptyMovieClip(“content_mc”, depth++);
preload(“1.jpg”);//set initial picture to be displayed[/AS]All your images should be in the format “1.jpg”,“2.jpg”,“3.jpg”, and so on… (no quotes)
Just create a textfield with an instance name of “myText” (no quotes) and 2 buttons (“backbutton” and “nextbutton”)
system
3
hi claudio,
thanks so much! this is a bit over my head - would it be ok to PM you?
julia
system
5
if anyone else can help point me to an easy tutorial, it would be much appreciated. thank you. 
system
6
im not sooo sure about this one… but if you go to www.flashkit.com they have some alright tutorials