import flash.utils.Timer; import flash.events.TimerEvent; var breite:Number = 1300; var speed:Number = -3; var myTimer:Timer = new Timer(50); myTimer.addEventListener(TimerEvent.TIMER, timerFunction); myTimer.start(); function timerFunction(event:TimerEvent) { if (hero.currentFrame == 15) { hero.gotoAndStop(2); } else { hero.gotoAndStop(hero.currentFrame+1); } if (panorama.x < - breite) { panorama.x = panorama.x+breite + speed; } else if (panorama.x > 0) { panorama.x += - breite + speed; } else { panorama.x += speed; } }