you could also do a:
for each sprite (ordered by sprite.x, ascending): set lowestx to sprite.x; stop loop
for each sprite (ordered by sprite.x, descending): set highestx to sprite.x; stop loop
etc.
set scrollx to (highestx+lowestx)/2
set scrolly to (highesty+lowesty)/2
and calculate the zoom according to your aspect ratio etc.