*WAS* first written in flash. But later it is ported to XBOX, DS, iOS in a different form of language. PS. iOS doesn't support flash or flash code. It was rewritten in each OS SDK and API.