Wenn Hauptfilm stoppt: Movieclip starten?

A

ab12ton

Hallo, ich habe ein Problem, und komme nicht weiter.
Ich möchte, das ein Movieclip abgespielt wird, wenn der Hauptfilm (root)
stoppt. Habe schon alles Mögliche ausprobiert ...

Soetwas wie (eines der Dinge, die ich probiert habe):

onClipEvent(enterframe) {
if (_root.enabled == false) {
filmstop.play();
}
}

Also ich habe keinen Event direkt dafür gefunden, also habe ich einen genommen,
der immer läuft, als Endlosschleife. Und dann es mit enabled versucht, aber das
funktioniert auch nicht :(

Vielleicht kann mir ja jemand helfen? Dank im Voraus!
 
Hi!
habs nicht ausprobiert aber sollte eigentlich functionieren.
Auf dein Movie der Abgespielt werden soll, in den ersten Frame:
PHP:
this.onEnterFrame = function(){
if(_root.enable==true){
this.gotoAndPlay("frame?");
}
}
auf dein _root.Movie in den Frame oder Function die Ausgelöst wird wenn der Fiml stopt:
PHP:
_root.enable=true;
oder ganz einfach:
PHP:
pfad_des_abzuspielendem_Movie.gotoAndPlay("frame?");
Gruß
 
Hi,

ob der Hauptfilm angehalten wurde, lässt sich u.U. auch so feststellen:
PHP:
// Code auf dem abzuspielenden MovieClip:
var lastframe = _root._currentframe;
this.onEnterFrame = function() {
    if (lastframe != _root._currentframe) {
        this.play();
    } else {
        this.stop();
    }
    lastframe = _root._currentframe;
}

Gruß
.
 
Vielen Dank für eure so überaus raschen Antworten!

Der Code von Datic (so einfach gelöst!) funktioniert, ich habe ihn so verwendet:

Code:
stop();
var lastframe = _root._currentframe;
onEnterFrame = function () {
	if (lastframe == _root._currentframe) {
		if (_global.nureinmal != 1) {
			play();
			_global.nureinmal = 1;
		}
	} else {
		_global.nureinmal = 0;
	}
	lastframe = _root._currentframe;
}

(Variable "nureinmal" ist als global definiert, weil sie anderswo noch mal
gebraucht wird um auf dies hier wiederum zu reagieren).

Viele Grüsse
 
Zurück