Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 26-01-2009, 16:28   #1 (permalink)
Neuer User
 
Benutzerbild von Fred aus B.
 
Registriert seit: Sep 2002
Ort: 20 km nördl. von Berlin
Beiträge: 172
Question Probleme mit Script für Bildergalerie

Ich habe eine einfache Bildergalerie, wo Bilder in einem Ordner in einem Container auf der Bühne angezeigt werden. Die Bilder werden durch
Schaltflächen jeweils weiter und zurück angezeigt.
Nachfolgendes Script verwende ich. Das Problem ist, ab dem 5. Bild wird mir nix mehr angezeigt. Mit 4 Bildern funktioniert es immer einwandfrei.

PHP-Code:
this.loadVariables("../_images/flash/bilder/GE.txt");
ausgabe_txt.text "Lade Daten...";
var 
anzBild;
MovieClip.prototype.fade = function(bol) {
    
this.onEnterFrame = function() {
        
this._alpha -= (bol) ? -10 10;
        (
this._alpha>=100 && bol || this._alpha<=&& !bol) ? delete this.onEnterFrame "";
    };
};
ASSetPropFlags(String.prototype,"fade",1,true);

this.onData = function() {
    
// Felder erzeugen
    
bildEintrag = new Array();
    
bildTitel = new Array();
    
// Einträge Trennen
    
bildEintrag daten.split(",");
    
// BildTitel+URL
    
for (var 0i<bildEintrag.lengthi++) {
        
bildTitel.push(bildEintrag[i].split("|"));
    }
    
// Filmsequenz Erzeugen
    
obj this.createEmptyMovieClip("mc0"1);
    
obj2 obj.createEmptyMovieClip("con"1);
    
// Bild in die Filmsequenz laden
    
obj2.loadMovie(bildTitel[0][1],"mc0");
    
// Positionieren
    
obj._x 39;
    
obj._y 68;
    
anzBild obj;
    
//this.mc._alpha = 0;//zuerst transparent
    // Textfeld mit Bildnamen
    
ausgabe_txt.text bildTitel[0][0];
};

weiter.onRelease = function() {
    
// Nächstes Bild
    
if (bild<bildTitel.length-1) {
        
bild++;
        
obj this._parent.createEmptyMovieClip("mc"+bildbild+1);
        
obj2 obj.createEmptyMovieClip("con"1);
        
obj2.createEmptyMovieClip("con",1);
        
//trace (obj);
        
obj._alpha 1;
        
obj._x 39;
        
obj._y 68;

        
loadMovie(bildTitel[bild][1], obj2);
        
obj.fade(true);
        
anzBild.fade(false);
        
anzBild obj;
        
ausgabe_txt.text bildTitel[bild][0];
    }
};

zuruck.onRelease = function() {
    
// Vorheriges Bild
    
if (bild>0) {
        
bild--;
        
obj this._parent.createEmptyMovieClip("mc"+bildbild+1);
        
obj2 obj.createEmptyMovieClip("con"1);
        
obj._alpha 0;
        
obj._x 39;
        
obj._y 68;
        
obj2.loadMovie(bildTitel[bild][1]);
        
obj.fade(true);
        
anzBild.fade(false);
        
anzBild obj;
        
ausgabe_txt.text bildTitel[bild][0];
    }
}; 
Das steht dann jeweils in der txt.datei drin:

daten=text-1 - Bild 1|../_images/flash/bilder/angebote_GE_1.jpg,
Text-2 - Bild 2|../_images/flash/bilder/GE_2.jpg,
Text-3 - Bild 3|../_images/flash/bilder/GE_3.jpg,
Text-4 - Bild 4|../_images/flash/bilder/4.jpg,
Text-5 - Bild 5|../_images/flash/bilder/5.jpg

Vielen Dank im voraus

F.

mod edit: code formatiert für bessere lesbarkeit!
__________________
Wer mich liebt der lacht. Wenn man mich sieht lachen alle.

Geändert von salazar (26-01-2009 um 16:32 Uhr)
Fred aus B. ist offline   Mit Zitat antworten
Alt 26-01-2009, 17:28   #2 (permalink)
Neuer User
 
Benutzerbild von Fred aus B.
 
Registriert seit: Sep 2002
Ort: 20 km nördl. von Berlin
Beiträge: 172
hat sich erledigt...da hatte sich wohl ein Leerzeichen in die TXT.datei im Script eingeschlichen...
__________________
Wer mich liebt der lacht. Wenn man mich sieht lachen alle.
Fred aus B. ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 02:51 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele