开发者

Json communication between flash and javascript

开发者 https://www.devze.com 2022-12-17 19:02 出处:网络
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 r

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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消