tags:

views:

91

answers:

1

Hi,

note: using django/python/javascript/flash

So its been two days since I'm stuck at the error. I did the things you told me to and found a couple of ways around it but nothing worked. These are the results.

Javascript does not receive the normal string it has to be a json object so. in views.py

somestring = json.dumps("HELLO WORLD")

which renders this in HTML

"HELLO WORLD"

and in javascript it is rendered like this

a240527176321_quote_hello 

Now, since it is a json object I need to convert it back in flash. But when it gets in flash where I receive it like this

function something(hellovar){
.....
......
}

it does not even come inside the function. Any thoughts?

+1  A: 

why do you communicate between flash and js via json? actionscript has a very powerfull build in ExternalInterface to communicate with javascript.

antpaw
I am using a localconnection to communicate the main problem is this in this line. It works fine for everything else. function sendScoreList(test){ testtext={{varsomething}} document.getElementById('leaderboard_swf').callSWF('asMethod',testtext); }where varsomething comes from the server
Fahim Akhter