Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 01-03-2007, 10:54   #1 (permalink)
aka The Addict
 
Benutzerbild von Martys
 
Registriert seit: Dec 2002
Ort: Bochum
Beiträge: 150
Question Movieclip Steuerung via Fernbedienung

Hallo zusammen,

habe ein kleines Problem, bei dem ich den Fehler nicht finde.

Ich habe drei MCs mit gleicher Anzahl an Frames, die ich nun über eine Fernbedienung steuern möchte. Starten, stoppen, zum Anfang und loopen (vorwärts - rückwärts) funktioniert auch ohne Probleme, nur das vor- bzw. zurückspringen um einen Frame bekomme ich nicht hin.

Hier der Code (liegt auf einem Steuer-MC):
PHP-Code:
onClipEvent(enterFrame){


if(
_root.richtung=="backward"){
    if (
this._currentframe == 1) {
        
_root.richtung "forward";
    }
    else {
        
this.prevFrame();            
    }
}

if(
_root.richtung=="forward"){
    if (
this._currentframe == this._totalframes) {
        
_root.richtung "backward";
    } 
    else {
        
this.nextFrame();
    }
}


if(
_root.richtung=="back"){
    if (
this._currentframe == 1) {
        
this.gotoAndStop(_currentframe);
    } else {
        
this._currentframe 1;
        
this.gotoAndStop(y); 
    }
}


if(
_root.richtung=="next"){
    if (
this._currentframe == this._totalframes) {
        
this.gotoAndStop(_currentframe);
    } 
    else {
        
this._currentframe 1;
        
this.gotoAndStop(y);
    }
}


if(
_root.richtung=="pause"){
    
this.stop();
}

if(
_root.richtung=="stop"){
    
this.gotoAndStop(1);
}

zahl this._currentframe;
_root.clip.ct.gotoAndStop(zahl);
_root.maske.mask.gotoAndStop(zahl);
_root.control.mc.gotoAndStop(zahl);
_root.clip.bild zahl "/213"


Ich tippe auf einen Fehler in

PHP-Code:
this._currentframe 1// bzw. -1
this.gotoAndStop(y); 
Wenn ich z.B. anstelle von y eine Zahl einsetze, springen die Movies in diesen Frame und stoppen. Die Variablen werden übergeben, die lasse ich mir über ein Testfeld anzeigen.

Hat jemand vielleicht einen Tipp für mich?

Danke schon mal,
Martys
Martys ist offline   Mit Zitat antworten
Alt 01-03-2007, 12:42   #2 (permalink)
wo ?
 
Registriert seit: Apr 2005
Beiträge: 4
versuchs mit
gotoAndStop.nextFrame();

vielleicht hülfts.
_tellTarget ist offline   Mit Zitat antworten
Alt 01-03-2007, 13:39   #3 (permalink)
aka The Addict
 
Benutzerbild von Martys
 
Registriert seit: Dec 2002
Ort: Bochum
Beiträge: 150
Bei
PHP-Code:
this.gotoAndStop.nextFrame(); 
passiert gar nichts,

bei
PHP-Code:
this.gotoAndStop(nextFrame()); 
genau das gleiche wie bei
PHP-Code:
this._currentframe 1// bzw. -1
this.gotoAndStop(y); 
nämlich dass der Film abspielt und nicht nur ein Bild vor- bzw. zurückspringt.

Hat jemand weitere Tipps?
Martys ist offline   Mit Zitat antworten
Alt 01-03-2007, 15:11   #4 (permalink)
wo ?
 
Registriert seit: Apr 2005
Beiträge: 4
eieiei

im Eifer des Gefechts ....

gotoAndStop kannst du weglassen, nur

nextFrame();
_tellTarget ist offline   Mit Zitat antworten
Alt 02-03-2007, 07:42   #5 (permalink)
aka The Addict
 
Benutzerbild von Martys
 
Registriert seit: Dec 2002
Ort: Bochum
Beiträge: 150
Funktioniert nicht, diese Aktion liegt auf den Vor- bzw. Zurückloop-Buttons.
Was mich nur so irritiert ist, dass wenn ich
PHP-Code:
this._currentframe 1// bzw. -1
this.gotoAndStop(y); 
durch bspw.
PHP-Code:
this.gotoAndStop(Framenummer); 
ersetzte, also auf einen bestimmten Frame als Zahl verweise, dann funktioniert es. Habe mir den y-Wert testweise ausgeben lassen, dieser wird als Zahl angezeigt.

Hier die Aktionen auf den Buttons im anderen Movie
Stop-Button
PHP-Code:
on (release) {
    
_root.richtung "stop";

Zurück-Button
PHP-Code:
on (release) {
    
_root.richtung "backward";

Ein-Frame-zurück-Button
PHP-Code:
on (release) {
    
_root.richtung "back";
    
_root.frame _root.steuerung.y;

Pause-Button
PHP-Code:
on (release) {
    
_root.richtung "pause";

Ein-Frame-vor-Button
PHP-Code:
on (release) {
    
_root.richtung "next";
    
_root.frame _root.steuerung.y;

Vorwärts-Button
PHP-Code:
on (release) {
    
_root.richtung "forward";

Sieht jemand eventuell den Fehler?
Martys 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 01:35 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele