在谷歌的内容中从javascript得到响应? (将Flash转换为html5) [英] get a response from javascript in a google's swiffy content? (flash converted to html5)
问题描述
我正在尝试使用Google的笨拙工具将as2内容转换为html5。
I am trying to play with google's swiffy to convert as2 content into html5.
到目前为止,一切都很棒。
so far it has been amazing.
使用getURL,我可以进行JavaScript调用。
using getURL, I can make javascript calls.
但是,我能否从服务器或JavaScript中获得某种响应?
But, will I be able to get sort of response from a server or javascript?
推荐答案
是。您可以从JavaScript调用 stage.setFlashVars('response = 10');
,然后在 _level0.response
之后在AS2中设置。但是 getURL
在设置 _level0.response
之前返回。因此,您应该使用 setTimeout
或 onEnterFrame
稍等一下。
Yes. You can call stage.setFlashVars('response=10');
from the JavaScript after which _level0.response
should be set in AS2. But getURL
returns before _level0.response
is set. So a you should wait a little bit with setTimeout
or onEnterFrame
.
这篇关于在谷歌的内容中从javascript得到响应? (将Flash转换为html5)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!