I did not see anything out of the ordinary in your code that would cause a problem converting to javascript. It might have to do with the presetting of static Object instances (sounds and images). Or, it may just be that your scenario is too large (or, its conversion is too large?). This, I doubt is it, though.