Inconsistent framerate

Hello everyone!

I am having some serious issues with the framerate in my game and I’m wondering if anyone can help.

I am trying to create a game where a character runs from the left side to the right side of a large level at speed. I am currently aiming at a tile-based level layout and through a lot of experimentation I am still having the same issues.

Coming from an AS2 background (this is written in AS3) my first attempt was a grid of movieclips, which changed using gotoAndStop, this was quite slow.

I next used a sectioning method, that sectioned out and built the whole level and only displayed the required sections - this used a lot of memory, but the speed was okay, just occasional hitching.

I have since tried numerous different bitmap methods, and each one seems to perform well, but I just can’t seem to shake the occasional hitching.

I have tried both timing the update on an on enter frame event and a timer event with an updateAfterEvent call, with no discernible difference between the two.

It looks like the game update and the renderer are not syncing up and I haven’t a clue on how to fix it.

I have been searching for similar games to see if I am biting off more than I can chew, but the Mirrors Edge 2D game seems to handle a similar idea without such horrible hitching.

I’ve uploaded the a version here (use arrow keys, DOWN and RIGHT mainly): http://www.realtimejunkie.co.uk/public/GameTest.html

If anyone has any ideas, please shout.

Thanks in advance!