Hallo,
ich habe eine normales Bewegungstween (von links nach rechts), das ich mit zwei Buttons und as steuere.
Auf dem rechten Button habe ich folgendes as:
Code:
_root.but_right.onPress = function() {
_root.stop();
this.onEnterFrame = function() {
if(_root._currentframe < _root._totalframes) {
_root.nextFrame();
}
}
}
_root.but_right.onRelease = _root.but_right.onReleaseOutside = function() {
if(_root._currentframe < _root._totalframes) {
_root.play();
}
}
Der rechte Button spielt die Animation nach rechts flüssig ab.
Für den linken Button habe ich dieses as:
Code:
_root.but_left.onPress = function() {
_root.stop();
this.onEnterFrame = function() {
if(_root._currentframe > 1) {
_root.prevFrame();
}
else {
_root.gotoAndStop(_root._totalframes);
}
}
}
_root.but_left.onRelease = _root.but_left.onReleaseOutside = function() {
if(_root._currentframe > 1) {
_root.play();
}
}
Zwar funktioniert der linke Button, also der Film wird rückwärts abgespielt, aber er springt einfach auf Frame1 und ist damit total abgehackt.
Wie bekomme ich das ganze flüssig hin?