Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 05-02-2006, 19:39   #1 (permalink)
Neuer User
 
Registriert seit: Jul 2004
Beiträge: 30
Question probleme mit script/mc steuerung

hi!

ich verzweifle langsam an einem problem. hab schon sämtliche foren durchforstet konnte aber keine lösung für mein prob finden.

wie kann ich es bewerkstelligen, daß bei knopfdruck( "btn0,1,2") erst der aktuelle MC("site1,2,3...") rückwärts und anschließent der gewünschte vorwärts abgespielt wird. nicht wie in diesem script beides gleichzeitig.....



HTML-Code:
this.site1.onEnterFrame = function() {
    if (_root.count == 1) {
        this.nextFrame();
    } else {
        this.prevFrame();
    }
};
this.site2.onEnterFrame = function() {
    if (_root.count == 2) {
        this.nextFrame();
    } else {
        this.prevFrame();
    }
};
this.site3.onEnterFrame = function() {
    if (_root.count == 3) {
        this.nextFrame();
    } else {
        this.prevFrame();
    }
};
this.site4.onEnterFrame = function() {
    if (_root.count == 4) {
        this.nextFrame();
    } else {
        this.prevFrame();
    }
};
this.site5.onEnterFrame = function() {
    if (_root.count == 5) {
        this.nextFrame();

    } else {
        this.prevFrame();
    }
};
this.site6.onEnterFrame = function() {
    if (_root.count == 6) {
        this.nextFrame();
    } else {
        this.prevFrame();
    }
}



;
this.btn0.onPress=function(){
    _root.count=1;
}
this.btn1.onPress=function(){
    _root.count=2;
}
this.btn2.onPress=function(){
    _root.count=3;
}
this.btn3.onPress=function(){
    _root.count=4;
}
this.btn4.onPress=function(){
    _root.count=5;
}
this.btn5.onPress=function(){
    _root.count=6;
}
....ausserdem sollte "site1" am anfang eingeblendet sein.

wäre für hilfreiche beiträge echt super dankbar!

gruß,
alex
ace445 ist offline   Mit Zitat antworten
Alt 05-02-2006, 20:19   #2 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
PHP-Code:
_global.oldClip;//globale variable zum abfragen
MovieClip.prototype.buttons = function(thisClip) {//parameter für späteren aufrufer
    
this.onPress = function() {
        if (
oldClip == undefined) {//für das "erste" mal klicken
            
thisClip.play();
            
_global.oldClip thisClip;
        } else {
            
_global.oldClip.onEnterFrame = function() {//alten rückwärts
                
this.prevFrame();
                if (
this._currentframe == 1) {
                    
delete this.onEnterFrame;
                    
this.gotoAndStop(1);
                    
thisClip.play();//neuen vorwärts
                    
_global.oldClip thisClip;//neuer ist alter
                
}
            };
        }
    };
};
//aufrufer
but_1.buttons(clip_1);
but_2.buttons(clip_2);
but_3.buttons(clip_3); 
mit "offenem" clip:
PHP-Code:
_global.oldClip;//flobale variable zum abfragen
MovieClip.prototype.buttons = function(thisClip) {//parameter für späteren aufrufer
    
this.onPress = function() {
        if (
oldClip == undefined) {//für das "erste" mal klicken
            
thisClip.play();
            
_global.oldClip thisClip;
        } else {
            
_global.oldClip.onEnterFrame = function() {//alten rückwärts
                
this.prevFrame();
                if (
this._currentframe == 1) {
                    
delete this.onEnterFrame;
                    
this.gotoAndStop(1);
                    
thisClip.play();//neuen vorwärts
                    
_global.oldClip thisClip;//neuer ist alter
                
}
            };
        }
    };
};
//aufrufer
clip_1.gotoAndStop(35);
_global.oldClip clip_1;
but_1.buttons(clip_1);
but_2.buttons(clip_2);
but_3.buttons(clip_3); 
Angehängte Dateien
Dateityp: rar linksystem.rar (5,2 KB, 7x aufgerufen)
__________________
Viola per Sempre
Alle Angaben ohne Gewehr!
trace your open mind in variables !
andretti
ActionScript Dictionary

Geändert von andretti (05-02-2006 um 20:22 Uhr)
andretti 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