What is the best way to communicate between JavaScript and Actionscript 2.0 and 3.0
What about support for major browser? IE 6+. FF 2+, Opera 9+, Safari 3+, Google Chrome? It is good idea to use actionscript to generate graphics (interface developed in JS and standard HTML forms)? Maybe its开发者_Go百科 better to use canvas? What about performance?
I would start with the flash.external.ExternalInterface object.
ExternalInterface
is AS3 specific. For AS2, use fscommand. I can't vouch for it though, as I haven't worked in AS2. As for AS3, I've usedExternalInterface
successfully in FF(3+), IE(8) and Chrome. Haven't heard anything about it not working in other browsers either.- As opposed to using Flash for the whole form? Yeah, that way the form will be accessible to users who don't have flash too.
- Given that you're targeted browsers include IE-6 et al, Canvas is hardly an option. According to the linked article, no version of IE supports canvas yet. Even FF started supporting it from FF3.
- About performance, its hard to say without knowing what you are trying to do.
精彩评论