有什么方法可以在Flash中显示HTML内容吗?

时间:2022-12-09 09:23:29

I want to show HTML content inside Flash. Is there some way to do this? I am talking about full blown HTML (with JavaScript if possible).

我想在Flash中显示HTML内容。有什么办法吗?我说的是完整的HTML(如果可能的话,使用JavaScript)。

6 个解决方案

#1


1  

Here is a decent article on how to accomplish that.

这里有一篇关于如何实现这一目标的文章。

@Flubba: I didn't say "great" article, I said "decent" - there is a big difference. Besides, no one else had answered and it had been around a while. I figured a "decent" answer was better than none. I am no Flash expert, so...

@Flubba:我没有说“好”,我说“好”——有很大的不同。再说,别人也没有回答,已经有一段时间了。我认为一个“得体”的回答总比没有强。我不是Flash专家,所以……

#2


3  

flashQuery supports HTML tags and CSS rules for Flash. It transforms flash into a really browser. Here it is: http://www.flashquery.org/

flashQuery支持HTML标签和CSS规则的Flash。它将flash转换成真正的浏览器。这是:http://www.flashquery.org/

#3


2  

You could also try http://motionandcolor.com/

你也可以试试http://motionandcolor.com/

Wrapper is a cross-browser compliant HTML/CSS rendering engine written in ActionScript that sits on top of your standards compliant HTML page.

包装器是一个跨浏览器兼容的HTML/CSS呈现引擎,用ActionScript编写,位于标准兼容的HTML页面之上。

Javascript might be tricker though.

不过Javascript可能比较复杂。

#4


1  

How complex HTML are we talking about? Simple HTML, like <b> and <i> is supported in text fields if you use the htmlText property. You can also attach a CSS style sheet to the text field for more styling. Have a look at TextField in the Flash API documentation (I'm sure you can just google it).

HTML有多复杂?如果使用htmlText属性,文本字段中支持简单的HTML,如。您还可以将CSS样式表附加到文本字段,以获得更多样式。在Flash API文档中查看TextField(我确信您可以直接谷歌)。

#5


1  

@JasonBunting

@JasonBunting

Here is a decent article on how to accomplish that.

这里有一篇关于如何实现这一目标的文章。

That's not a great article - it's seven years old and doesn't mention the CSS capabilities of Flash. It covers only the basics of HTML support in Flash.

这不是一篇很棒的文章——它已经有7年的历史了,而且没有提到Flash的CSS功能。它只涵盖了Flash中HTML支持的基础知识。

Adobe have a more authoritative page here: Using HTML text formatting in Flash CS3 Professional

Adobe在这里有一个更权威的页面:在Flash CS3专业版中使用HTML文本格式

Things have moved on a lot since then. Flash MX 2004 added CSS capabilities and there is a good article from Kirupa.com about that - Using CSS Styles in Flash MX 2004

从那以后,事情发生了很大变化。Flash MX 2004增加了CSS功能,有一篇来自Kirupa.com的好文章介绍了这一点——在Flash MX 2004中使用CSS样式

Don't be thinking you'll just import a modern page into Flash and it'll render - that ain't going to happen. This stuff is for styling text areas. You won't get JavaScript executing because you're reliant on the subset of HTML and CSS that Flash supports in a text object, and Flash has a different object model from a web page.

不要以为你会把一个现代的页面导入到Flash中,它就会呈现出来——那是不会发生的。这个东西用于样式化文本区域。您不会执行JavaScript,因为您依赖于Flash在文本对象中支持的HTML和CSS的子集,而Flash与web页面有不同的对象模型。

#6


0  

If it is complex HTML and Javascript, one possible way is HTMLComponent, a method that uses an iframe over your flash to make it appear like the HTML is in your app. There are a few downsides to this method however - most of them described in detail at Deitte.com.

如果是复杂的HTML和Javascript,一种可能的方法是HTMLComponent,这个方法在你的flash中使用一个iframe,使它看起来像你的应用程序中的HTML。

If this can move offline, you could use Air (it has an mx:HTML component built in). Deitte.com has a detail of this technique as well.

如果可以离线,可以使用Air(它内置了mx:HTML组件)。Deitte.com也详细介绍了这项技术。

#1


1  

Here is a decent article on how to accomplish that.

这里有一篇关于如何实现这一目标的文章。

@Flubba: I didn't say "great" article, I said "decent" - there is a big difference. Besides, no one else had answered and it had been around a while. I figured a "decent" answer was better than none. I am no Flash expert, so...

@Flubba:我没有说“好”,我说“好”——有很大的不同。再说,别人也没有回答,已经有一段时间了。我认为一个“得体”的回答总比没有强。我不是Flash专家,所以……

#2


3  

flashQuery supports HTML tags and CSS rules for Flash. It transforms flash into a really browser. Here it is: http://www.flashquery.org/

flashQuery支持HTML标签和CSS规则的Flash。它将flash转换成真正的浏览器。这是:http://www.flashquery.org/

#3


2  

You could also try http://motionandcolor.com/

你也可以试试http://motionandcolor.com/

Wrapper is a cross-browser compliant HTML/CSS rendering engine written in ActionScript that sits on top of your standards compliant HTML page.

包装器是一个跨浏览器兼容的HTML/CSS呈现引擎,用ActionScript编写,位于标准兼容的HTML页面之上。

Javascript might be tricker though.

不过Javascript可能比较复杂。

#4


1  

How complex HTML are we talking about? Simple HTML, like <b> and <i> is supported in text fields if you use the htmlText property. You can also attach a CSS style sheet to the text field for more styling. Have a look at TextField in the Flash API documentation (I'm sure you can just google it).

HTML有多复杂?如果使用htmlText属性,文本字段中支持简单的HTML,如。您还可以将CSS样式表附加到文本字段,以获得更多样式。在Flash API文档中查看TextField(我确信您可以直接谷歌)。

#5


1  

@JasonBunting

@JasonBunting

Here is a decent article on how to accomplish that.

这里有一篇关于如何实现这一目标的文章。

That's not a great article - it's seven years old and doesn't mention the CSS capabilities of Flash. It covers only the basics of HTML support in Flash.

这不是一篇很棒的文章——它已经有7年的历史了,而且没有提到Flash的CSS功能。它只涵盖了Flash中HTML支持的基础知识。

Adobe have a more authoritative page here: Using HTML text formatting in Flash CS3 Professional

Adobe在这里有一个更权威的页面:在Flash CS3专业版中使用HTML文本格式

Things have moved on a lot since then. Flash MX 2004 added CSS capabilities and there is a good article from Kirupa.com about that - Using CSS Styles in Flash MX 2004

从那以后,事情发生了很大变化。Flash MX 2004增加了CSS功能,有一篇来自Kirupa.com的好文章介绍了这一点——在Flash MX 2004中使用CSS样式

Don't be thinking you'll just import a modern page into Flash and it'll render - that ain't going to happen. This stuff is for styling text areas. You won't get JavaScript executing because you're reliant on the subset of HTML and CSS that Flash supports in a text object, and Flash has a different object model from a web page.

不要以为你会把一个现代的页面导入到Flash中,它就会呈现出来——那是不会发生的。这个东西用于样式化文本区域。您不会执行JavaScript,因为您依赖于Flash在文本对象中支持的HTML和CSS的子集,而Flash与web页面有不同的对象模型。

#6


0  

If it is complex HTML and Javascript, one possible way is HTMLComponent, a method that uses an iframe over your flash to make it appear like the HTML is in your app. There are a few downsides to this method however - most of them described in detail at Deitte.com.

如果是复杂的HTML和Javascript,一种可能的方法是HTMLComponent,这个方法在你的flash中使用一个iframe,使它看起来像你的应用程序中的HTML。

If this can move offline, you could use Air (it has an mx:HTML component built in). Deitte.com has a detail of this technique as well.

如果可以离线,可以使用Air(它内置了mx:HTML组件)。Deitte.com也详细介绍了这项技术。