Index: Amf/Parse/Amf3/Serializer.php
===================================================================
--- Amf/Parse/Amf3/Serializer.php	(revision 14142)
+++ Amf/Parse/Amf3/Serializer.php	(working copy)
@@ -223,13 +223,16 @@
         // have to seperate mixed from numberic keys.
         $numeric = array();
         $string  = array();
+        $serial = 0;
         foreach ($array as $key => $value) {
-            if (is_int($key)) {
+            if (is_int($key) && $key == $serial) {
                 $numeric[] = $value;
+                $serial ++;
             } else {
                 $string[$key] = $value;
             }
         }
+        
 
         // write the preamble id of the array
         $length = count($numeric);

