问题
Folks,
I am pulling all my Flash (pure AS3 project, not Flash CS3) content from a Drupal back-end for SEO purposes. This works great, except the HTML rendering built into the TextField object leaves a lot to be desired. Could anyone recommend any libraries that would allow me to display HTML elements? At this stage, commercial or open-source libraries are welcome.
Thanks, Marcus
回答1:
you might also want to try: http://code.google.com/p/htmlwrapper/
I haven't used it but it looks like it does what you want.
回答2:
AIR introduces a DisplayObject called flash.html.HTMLLoader. It's powered by WebKit, so if your content is compatible with Safari, it will work with HTMLLoader.
回答3:
There is an Flex HTML component available that's pretty good. It uses the browser to render the contents.
However it's not free. You will have to invest $149.
You can test the capabilities of this component here.
回答4:
2Synthmax http://as3htmlparser.sourceforge.net/
回答5:
Try using this Flex iFrame, which is modeled after it's HTML iframe counterpart. I haven't used this solution in my Flex applications yet, but it looks promising.
http://deitte.com/archives/2006/08/finally_updated.htm
However, please note that this same author now recommends against using this.
As always, your mileage may vary, Randy Stegbauer
回答6:
Does your swf need to fill all of the web page? Why not have your swf call some javascript that will populate a DIV or whatever. Or just have the PHP generate that. I guess I need more information what you're trying to do...
回答7:
So long as your project is viewed within a web browser, your best bet would be to overlay HTML content in a DIV or iFrame above the Flash content using a JavaScript tool such as JQery's ThickBox
回答8:
You could try out this AS3 HTML Parser Library ... works well for my needs, It currently supports most elements (including img, span, div).
来源:https://stackoverflow.com/questions/260270/display-html-in-an-actionscript-3-project