also muss ich meinen Erklärungstext als Grafik speichern, weil es ja im Contrainer geladen wird?
wo genau muss das varImg hin. einmal ist er ja schon mit 0 vorhanden.
Oje
var images = new Array("1.jpg", "2.jpg", "3.jpg", "4.jpg", "5.jpg", "6.jpg", "7.jpg");
// In diesem Array alle Pfade zu den Bildern angeben!
var interval = 5000; // Slideshow-Intervall in Milisekunden
var amt = images.length; // NICHT mehr verändern!
var sliding = false;
var fade_speed = 10; // Fade-Geschwindigkeit
_global.root = this;
var iv = 0;
var current = 0;
var current_cont = 2;
container1._alpha = 0;
container2._alpha = 0;
container1.createEmptyMovieClip("img", 1);
container2.createEmptyMovieClip("img", 1);
container1.img.loadMovie(images[0]);
function stepImg(0) {
current += o;
if (current > amt) current = 1;
if (current < 1) current = 1;
np = current + o;
if (np > amt) np = 1;
if (np < 1) np = 1;
var new_cont = (current_cont == 1)? 2 : 1;
root["container" + new_cont].img.loadMovie(images[current - 1]);
if (sliding) clearInterval(iv);
var obj = root["container" + new_cont].img;
root.onEnterFrame = function() {
if (obj.getBytesLoaded() >= obj.getBytesTotal() && obj.getBytesLoaded() > 10) {
fadeOut(root["container" + current_cont], np);
current_cont = new_cont;
fadeIn(root["container" + current_cont]);
if (sliding) iv = setInterval( stepImg, interval, 1);
delete this.onEnterFrame;
}
}
}
function doStop() {
clearInterval(iv);
sliding = false;
}
function doSlide() {
clearInterval(iv);
iv = setInterval( stepImg, interval, 1);
sliding = true;
}
function fadeOut(obj, np) {
obj.onEnterFrame = function() {
if (this._alpha >= fade_speed) {
this._alpha -= fade_speed;
} else {
this._alpha = 0;
this.img.loadMovie(images[np - 1]);
delete this.onEnterFrame;
}
}
}
function fadeIn(obj) {
obj.onEnterFrame = function() {
if (this._alpha <= 100 - fade_speed) {
this._alpha += fade_speed;
} else {
this._alpha = 100;
delete this.onEnterFrame;
}
}
}