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?

mkto
  • 4,584
  • 5
  • 41
  • 65

1 Answers1

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.

Mark Ursino
  • 31,209
  • 11
  • 51
  • 83
Ron700
  • 66
  • 1
  • 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:http://www.google.com/doubleclick/studio/swiffy/faq.html – mkto Mar 02 '12 at 08:26
  • I edited my answer, but it probably was rejected. So I have put an example (including the source-fla) [here](http://www.ronaldliauw.nl/stackoverflow/dunforget/) – Ron700 Mar 10 '12 at 14:07
  • Yesterday I finished [this](http://www.ronaldliauw.nl/nudn/woordzoeker/). 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. – Ron700 Mar 14 '12 at 22:10
  • 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. – Ron700 Jun 18 '12 at 11:58