AS3 Programmier-Probleme

  • Guten Tag:)

    habe mal was mit as2 programmiert, was auch gut geklappt hat:

    stop();

    rechtsNeu.onRollOver=function(){
    this.gotoAndStop(2);
    this._parent.hallo.gotoAndStop(2);
    }
    rechtsNeu.onRollOut=function(){
    this.gotoAndStop(1);
    this._parent.hallo.gotoAndStop(1);
    }

    rechtsNeu.onPress = function() {
    this.onEnterFrame = function(){
    if(this._parent.rolleNEU._currentframe == 101){
    rolleNEU.gotoAndStop(1);
    }
    this._parent.rolleNEU..gotoAndPlay(this._parent._currentframe+1);
    }
    }
    rechtsNeu.onRelease = function() {
    this.onEnterFrame = function(){
    this._parent.rolleNEU..stop();

    }
    }


    linksNeu.onRollOver=function(){
    this.gotoAndStop(2);
    this._parent.hallo.gotoAndStop(2);
    }
    linksNeu.onRollOut=function(){
    this.gotoAndStop(1);
    this._parent.hallo.gotoAndStop(1);
    }
    linksNeu.onPress = function() {
    this.onEnterFrame = function(){
    if(this._parent.rolleNEU._currentframe == 1){
    this._parent.rolleNEU.gotoAndStop(101);
    }
    this._parent.rolleNEU.gotoAndStop(this._parent._currentframe-1);
    }
    }
    linksNeu.onRelease = function() {
    this.onEnterFrame = function(){
    this._parent.rolleNEU._parent.stop();
    }
    }

    sprich es gibt einen rechten und einen linken Button. Beim gedrückt-Halten wird ein Movieclip "rolleNEU" flüssig nach vorne oder nach hinten bewegt. Jetzt bei as3 kriege ich
    das nicht hin:


    stop();


    import flash.events.MouseEvent;
    import flash.events.Event;


    rechtsNeu.addEventListener(MouseEvent.MOUSE_OVER, over);
    function over(event:MouseEvent):void {
    rechtsNeu.gotoAndStop(2);
    }


    rechtsNeu.addEventListener(MouseEvent.MOUSE_OUT, out);
    function out(event:MouseEvent):void {
    rechtsNeu.gotoAndStop(1);
    }


    rechtsNeu.addEventListener(MouseEvent.MOUSE_DOWN, drucken);
    function drucken(event:MouseEvent):void {
    rechtsNeu.addEventListener(Event.ENTER_FRAME, testen);
    function testen(event:Event):void {

    if (rolleNEU.currentFrame == 101) {
    rolleNEU.gotoAndPlay(1);
    }

    rolleNEU.gotoAndStop(rolleNEU.currentFrame+1);
    //trace(rolleNEU.currentFrame);
    }
    }


    rechtsNeu.addEventListener(MouseEvent.MOUSE_UP, loslassen);
    function loslassen(event:MouseEvent):void {
    rechtsNeu.addEventListener(Event.ENTER_FRAME, testeno);
    function testeno(event:Event):void {

    trace(rolleNEU.currentFrame);
    rolleNEU.stop();
    }
    }


    wenn ich auf den rechten button drücke und gedrückt halte soll, läuft der movieclip zwar wie er soll. Wenn ich ihn aber loslasse, soll er stoppen, macht er aber nicht. Sprich ich kriege das "rechtsNeu.addEventListener(Event.ENTER_FRAME, testeno);" von rechten Button nicht weg. Könnt Ihr mir da mal helfen bitte:)

    Im alten as2 musste man das "this.onEnterFrame = function()" nicht löschen und es hatte nur Auswirkungen nur beim gedrücktem Button.

    VIELEN DANK FÜR EURE HILFE!!!!