get a response from javascript in a google's swiffy content? (flash converted to html5)
Asked Answered
T

1

2

I am trying to play with google's swiffy to convert as2 content into html5.

so far it has been amazing.

using getURL, I can make javascript calls.

But, will I be able to get sort of response from a server or javascript?

Thatch answered 9/2, 2012 at 15:1 Comment(0)
C
0

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.

Confiture answered 1/3, 2012 at 14:50 Comment(4)
hi have you tried that before? According to Google stage.setFlashVars can only be called before stage.start(); What i guess is we cannot keep setting flash vars when the stage has already started. source:google.com/doubleclick/studio/swiffy/faq.htmlThatch
I edited my answer, but it probably was rejected. So I have put an example (including the source-fla) hereConfiture
Yesterday I finished this. The words from the 'woordzoeker'-games and the url's from the sounds are controlled by xml-files. Works great in Chrome but less in Firefox and Safari. When SVG is available I use swiffy otherwise flash but it should be the other way around. First flash then swiffy.Confiture
I accidently replaced the 'woordzoeker'-games by a Flash CreatJs-version of the game. I like the fact that games exported with the CreateJs-plugin also can work on the iPad and iPod as CreatJs targets canvas instead of svg.Confiture

© 2022 - 2024 — McMap. All rights reserved.