In the film days you would quickly manually zoom your lens in or out or in/out (the effect is different accordingly) while shooting @ something like 1/15 with a flash burst at the end of your exposure to keep the final in-focus area sharp.
It took some practice to get it right - and it could be done hand held with the flash. Today you can easily experiment and check your results on screen while you practice. Remember to zoom fast but steady!
I developed a fixed setting with a specific zoom/flash/exposure sombo that I found worked out well. I suggest you also try to start finding a specific set-up that works for you at first. Or else you will find yourself doing a lot of hit/miss photography. When you first get it right, its not that difficult anymore -I even did this for wedding photos (people loved it back then).
Btw. this effect is mostly done digitally today - but its not quite the same "look" you get.