I am not sure of the capabilities of the gd libraries but i highly recomend you looking serously into libswf and compiling that into php4. In the ways of dynamic graphical content flash is the way to go (and its supported under most main sream broswers i.e. netscape 4.0 for linux) and making dynamic flash with libswf is just awesome. And it also keeps the file size down, i shudder at thinking about downloading bloated animated gifs. just my $0.02 but i think you will be happier with the results you can get from libswf.
-Jon