Playing Backwards through frames

I’m having a bit of a problem with getting the timeline to play backwards through frames. I’ve tried doing something like the following and thought it should’ve worked but it didn’t, and I need some help with this plz:

[COLOR=dimgray]function onEnterFrame() {[/COLOR]
[COLOR=dimgray] gotoAndPlay(lastframe);
lastframe = _currentframe–;[/COLOR]
[COLOR=dimgray]}[/COLOR]

Thanks :slight_smile: