-1

I have a flash animation file converted into HTML5 file using SWIFFY. These files are being played in WebView, they play fine.

There are few animations in HTML5, I would like to control these little animations in Android locally on the touch event. I want to know as to how to expose these animations to the Android layer, is there anything else required like Javascript or JQuery?

I would like to add, that I am totally new to HTML5, CSS, JavaScript and JQuery.

Any help would be greatly appreciated.

Alfred
  • 331
  • 4
  • 9

1 Answers1

1

If I understand the problem, you can't do it like that because the animations defined within the swiffyobject become parts of one larger svg, which the swiffy runtime then manages. The runtime itself exposes just a small API, which is a bit constraining. I've found no way to say "my swiffy.someAnimationWithin.doSomething()"

What you can do is use stage.setFlashVars to pass "messages" to your ActionScript, which of course was also translated and is being played by the runtime. In this ActionScript, use onEnterFrame to check for those variables/messages then change their states with ActionScript. The animation can also talk back to your JavaScript via ActionScript's getURL("javascript: mynamespaceObj.doSomethingScripty()") or, I believe, AS3's URLRequest(...)