Hi,
Question 1 - Why is the jpeg loading in the lo_container mc only after the jpeg in the container mc is loaded? Doesn’t seem like it should. I want the lo jpeg to load right away (it is very lo rez) the preloader run over top then when the second jpeg is loaded fadeOut the lo jpeg. Right now the lo jpeg is not viewable as the preloader is going
Question 2 - I’m trying to set up next and previous buttons which would modify the index var. My code is definitely wrong right now…
all Frame 1
on an actions layer…
[AS]createEmptyMovieClip(“lo_container”, 2);
lo_container._x = 0;
lo_container._y = 168.1;
createEmptyMovieClip(“container”, 1);
container._x = 0;
container._y = 168.1;
//variables
var series = “p”;
var index = 1;
var totalFiles = 22;
// start the show
loadMovie("…/images/"+series+"/lo_image"+index+".jpg", “lo_container”);
loadMovie("…/images/"+series+"/image"+index+".jpg", “container”);
fadeIn = function () {
if (lo_container._alpha<=100) {
lo_container._alpha -= 10;
}
};[/AS]
on a preloader layer…
[AS]stop();
container._visible = false;
this.onEnterFrame = function() {
var l = container.getBytesLoaded();
var t = container.getBytesTotal();
var getPercent = l/t;
loadText = “Photo loading… “+Math.round(getPercent*100)+”%”;
if (l > 0 && l >= t) {
container._visible = 1;
loadText = “”;
fadeIn();
}
};[/AS]
on each buttone…
[AS]next.onPress = function() {
if (index>=1) {
index++;
}
};[/AS]
[EDIT by kode]Please use the ActionScript tag [AS][/AS] to show your code.[/EDIT]