Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 25-07-2004, 20:03   #1 (permalink)
Neuer User
 
Registriert seit: Nov 2003
Beiträge: 28
Preloader, bei dem der Balken weniger wird

kann mir jemand dieses Script so umschreiben, dass der Ladebalken von links nach rechts weniger wird, bis er weg ist. praktisch ein umgekehrter Ladebalken (von 100% auf 0% , von links nach rechts).

onClipEvent (load) {
gesamt = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
bereits = _root.getBytesLoaded();
prozent = bereits*100/gesamt;
mc_balken._width = prozent*2;
prozent = int(prozent)+" %";
if (prozent == "100%") {
i++;
if (i > 30) {
_root.play ();
}
}
}

thx
fexxx ist offline   Mit Zitat antworten
Alt 25-07-2004, 20:24   #2 (permalink)
Flash & TYPO3
 
Registriert seit: Oct 2003
Ort: Bayern
Beiträge: 2.700
Man kann Code auch formatieren!

Hier:


PHP-Code:
/////////////////////////////////////////////////////////
_root.txtProzent._visible 0;
_root.balken._visible 0;
_root.createEmptyMovieClip("container"10);
_root.container._x 50;
_root.container._y 50;
/////////////////////////////////////////////////////////
extern_laden = function (clip) {
    
_root.container.loadMovie(clip);
    
_root.createEmptyMovieClip("control"20);
    
_root.txtProzent._visible 1;
    
_root.control.onEnterFrame = function() {
        if (
_root.container.getBytesLoaded()>=4) {
            
_root.balken._visible 1;
            
_root.container._visible 0;
            
gesamt _root.container.getBytesTotal();
            
bereits _root.container.getBytesLoaded();
            
prozent Math.ceil((bereits/gesamt)*100);
            
_root.txtProzent.text prozent+"%";
            
// Start: Hier dein Wunsch mit eingefügt
            
_root.balken._width 100-prozent;
            
_root.balken._x 500+prozent/2;
            
// Ende
            
if (prozent == 100) {
                
_root.container._visible 1;
                
_root.container.gotoAndPlay(2);
                
_root.txtProzent._visible 0;
                
_root.balken._visible 0;
                
delete this.onEnterFrame;
            }
        }
    };
};
//////////////////////////////////////////////////////////
_root.button.onPress = function() {
    
extern_laden("MyClip.end");
};
////////////////////////////////////////////////////////// 
Angehängte Dateien
Dateityp: rar extern_loader.rar (2,7 KB, 18x aufgerufen)
__________________
Mediendesign-Student
johanness 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:22 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele