mickorz / rtmplite

Automatically exported from code.google.com/p/rtmplite
1 stars 0 forks source link

Python list to AMF in rtmplite #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by alfonz77 <tengerivan@gmail.com> on Nov 29, 2010.

Hello,

First of all congrats for the project I really like it simplicity. I
am trying to build a multi-player game with Flex and Python - I am a
beginner with Python. I noticed that Python lists are nor sent
correctly to Flash - actually when I try to send a list I get corrupt
data on the Flash side. Currently I make a workaround by converting
lists to dictionaries before sending. Am I missing something?

Original issue reported on code.google.com by voiprese...@gmail.com on 5 Feb 2011 at 5:25

GoogleCodeExporter commented 9 years ago
The problem is that rtmplite currently uses only AMF0, and the list was 
introduced in AMF3. In AMF0, the lists are treated as dictionary.

Original comment by voiprese...@gmail.com on 5 Feb 2011 at 5:26

GoogleCodeExporter commented 9 years ago
Hi,

The rtmplite software currently only uses AMF0, and from what I recall it does 
not implement list/array, but only associative array/dictionary. So when you 
send an array from ActionScript, it will become dict in Python with index as 0, 
1, 2, ..., and when you send array from Python it will  not work.

I have added a TODO task for me to migrate it to allow AMF3 in 
http://code.google.com/p/rtmplite/source/browse/trunk/amf.py

Original comment by voiprese...@gmail.com on 5 Feb 2011 at 5:34