Is it possible to change the speed of the simulation?

Is it possible to change the speed of the simulation?

For example if i want to set the simluation in slow motion and then accelerate it to 2 or 3x, how can i achieve it?
what parameter should i change?

With the same parameters is even possible to play the simluation backwards giving a negative parameter?
The simulation is updated most likely in an enter frame event or a timer object,
that is where you change the speed.
change the world step parameters.

the first parameter in the b2world.Step function is the step size.

You've probably been told to put it as 1/framerate. Now let me explain to you how it works:

what happens is that every time you call that function, the world is making everything move as they would in the time (in seconds) that is given by the first parameter (dt). Its set to 1 over your frame rate because (lets use 30fps for this example) you update your flash project 30 times per second, so once every 30th of a second. You then step the world by 1/30th of a second so that by the time 30 frames have passed (making your movie to play 1 second) 30 steps have been called. if the dt was set to 1/60, it would only step a total of half a second for every second that flash plays. Im sure you can work out the rest from here.

Original thread: https://box2d.org/forum/viewtopic.php?t=4810