I am using this to get a list of all attachments of a post in WordPress 3.2
$args = array(
'numberposts' => -1,
'post_status' => 'any',
'post_type' => 'attachment',
'orderby' => 'title',
'order' => 'ASC'
);
get_posts($args);
Nothing I do in the ‘orderby’ argument has any effect on the order in which the attachments are displayed. Can you order attachments by title? alphabetical order? in WordPress
Try sorting the returned array using array_multisort() and the ‘title’ key.