css 闪光

tech2024-05-16  81

css 闪光

Macromedia Flash. It’s one of the most controversial products in the Web development world.

Macromedia Flash。 它是Web开发领域中最具争议的产品之一。

In this article we’ll look at the strengths and weaknesses of Flash. We’ll take a close look at what it can do, and what it can’t or shouldn’t do. And, through this process, we’ll compare Flash to its counterparts HTML and CSS.

在本文中,我们将介绍Flash的优缺点。 我们将仔细研究它可以做什么,以及它不能或不应该做什么。 并且,通过此过程,我们将Flash与对应HTML和CSS进行比较。

This article is sure to create debate …and a lot of additional email for me! But I wrote it with the intent of informing novice Flash users about this technology. At the least, this article should allow you to communicate with prospective clients the reasons why a project should or shouldn’t be done in Flash.

这篇文章肯定会引起争论……还有很多其他电子邮件给我! 但是我写此书的目的是向Flash新手介绍此技术。 至少,本文应允许您与潜在客户交流为什么应该或不应该在Flash中完成项目的原因。

大胆的陈述 (A Bold Statement)

HTML and CSS will never be able to do what Flash does. With that statement alone some people have launched their mail client, but before you compose that bitter email, allow me to explain this statement.

HTML和CSS将永远无法完成Flash的工作。 仅凭该声明,有人启动了他们的邮件客户端,但是在撰写那封苦涩的电子邮件之前,请允许我解释一下此声明。

Let’s take a look at the strengths of Macromedia’s multimedia vector product, Flash. Then we will examine its weaknesses and finish with a comparison of the HTML/CSS tandem.

让我们看一下Macromedia多媒体矢量产品Flash的优势。 然后,我们将检查它的弱点,并与HTML / CSS串联进行比较。

What does Flash do that HTML and CSS can’t?

Flash不具备HTML和CSS的功能?

Flash’s Strengths

Flash的优势

Freedom

自由

Flash provides a degree of freedom of development that’s not found elsewhere. Flash allows the designer to place objects anywhere they like without having to worry about absolute/relative placement, box model problems, inconsistencies across browsers, z-indexes, tables-in-tables-in-tables, sliced up graphics or screen resolutions. In Flash, you simply place the object where you want it on your canvas and move on. Free at last! Free at last! Thank God Almighty, we’re free at last!

Flash提供了其他地方无法找到的开发自由度。 Flash使设计人员可以将对象放置在所需的任何位置,而不必担心绝对/相对放置,框模型问题,浏览器之间的不一致,z索引,表中表,表中分割的图形或屏幕分辨率。 在Flash中,您只需将对象放在画布上所需的位置并继续前进即可。 终于自由了! 终于自由了! 感谢全能的上帝,我们终于有空了!

Seriously, this advantage is not to be taken lightly. As designers, this is what we’ve been wanting since the beginning of the Web: the ability to design without limitations being placed on us by browsers or programming languages. With Flash, you no longer need to worry about which browsers your page will render correctly in and which will choke on it. Your page renders the same way – correctly — in all browsers.

认真地讲,这个优点不容小视。 作为设计师,这是自网络开始以来我们一直想要的:设计能力不受浏览器或编程语言的限制。 使用Flash,您不再需要担心页面将正确呈现在哪些浏览器中以及哪个页面会被其阻塞。 您的页面在所有浏览器中均以正确的方式呈现。

Greater Interactivity

互动性更高

Flash provides an interactive environment for a more involved multimedia experience. We’re not just talking about rollovers that swap colors or images, which, by the way, are a piece of cake in Flash, where they can even include sound. We’re talking about the bigger deal here.

Flash提供了一个交互式环境,以提供更多的多媒体体验。 我们不仅在谈论交换颜色或图像的过渡,顺便说一下,这在Flash中是小菜一碟,它们甚至可以包含声音。 我们在这里谈论更大的交易。

Flash allows you to incorporate sound into your pages via mp3 and wav files, allowing you to use, for example, speech or background music. You can also directly import digital video into Flash, which allows you to easily demo products or just show off the family. It’s true that Flash is not the only way to include video into a Web page. There are other tools, such as Windows Media Player, Real-Player, and QuickTime. However, the Flash player plug-in penetration is now at around 97%. Compared to Windows Media Player plug-in at 59%, Real-Player plug-in at 56% and QuickTime player plug-in at 41%, Flash is streets ahead.

Flash使您可以通过mp3和wav文件将声音合并到页面中,从而可以使用语音或背景音乐。 您还可以直接将数字视频导入Flash,这使您可以轻松地演示产品或只是展示产品系列。 的确,Flash不是将视频包含到网页中的唯一方法。 还有其他工具,例如Windows Media Player,Real-Player和QuickTime。 但是,Flash Player插件的渗透率现在约为97%。 与Windows Media Player插件(59%),Real-Player插件(56%)和QuickTime Player插件(41%)相比,Flash领先。

Ok, so maybe you’re annoyed by music and video in Websites. No problem! Just don’t add it. But at least you have the option to incorporate these elements on, for instance, client sites if you use Flash. HTML/CSS simply don’t offer the option.

好的,所以也许您对网站中的音乐和视频感到恼火。 没问题! 只是不添加它。 但是至少,如果您使用Flash,则至少可以选择将这些元素合并到客户端站点上。 HTML / CSS根本不提供该选项。

Greater Control

更好的控制

Flash’s vector rendering processes give it the ability to adjust the entire display size based on the browser size and, in doing so, keep your images and text clean and unpixelated. This will become more of an advantage as people begin to more frequently surf the Web from sources other than desktop computers, such as PDAs, mobile phones, car displays or wrist-watches.

Flash的矢量渲染过程使它能够根据浏览器的大小来调整整个显示大小,并在此过程中保持图像和文本的清洁和无像素化。 随着人们开始越来越多地从台式机以外的其他来源(例如PDA,移动电话,汽车显示器或手表)上浏览Web,这将变得更加有利。

Improved Integration

改善整合

Flash allows you to integrate any multimedia file format into your site. For example, bitmap image formats (such as, GIF, JPEG, PNG, PCT, TIF), vector image formats (including FreeHand files, EPS, Illustrator files), and as previously mentioned, sound formats (WAV, AIF, MP3) can all be imported into a Flash movie.

Flash使您可以将任何多媒体文件格式集成到您的站点中。 例如,位图图像格式(例如GIF,JPEG,PNG,PCT,TIF),矢量图像格式(包括FreeHand文件,EPS,Illustrator文件)以及如前所述的声音格式(WAV,AIF,MP3)可以全部导入到Flash电影中。

Easier Font Handling

更轻松的字体处理

With Flash you have the ability to embed any font you wish and have it display in the client browser regardless of whether they have the font installed on their machine. You no longer have to convert fonts to images in order to maintain the font for display on varying user systems.

使用Flash,您可以嵌入所需的任何字体,并将其显示在客户端浏览器中,而不管其计算机上是否安装了字体。 您不再需要将字体转换为图像即可保持字体显示在不同的用户系统上。

Replicate Frames

复制框架

Flash can replicate the behavior of frames on an HTML Website in that it can maintain in a fixed position certain parts of the Web page, such as the navigation buttons, as other parts of the screen scroll.

Flash可以复制HTML网站上框架的行为,因为Flash可以将网页的某些部分(例如导航按钮)保持在固定位置,就像屏幕上的其他部分一样。

Stand-Alone Movies

独立电影

Flash allows you to play movies as stand-alone presentations called projectors. Projectors are Flash movies that come complete with an embedded player — you don’t even need a Web browser to play these Flash movies! You can burn Flash projectors to CD-ROMs or DVDs.

Flash使您可以将电影作为独立的演示文稿(称为投影仪)来播放。 投影仪是带有嵌入式播放器的Flash电影,您甚至不需要Web浏览器即可播放这些Flash电影! 您可以将Flash投影仪刻录到CD-ROM或DVD。

No Reload

没有重装

Flash gives you the ability to display data as part of an ever-changing process without having to reload or refresh the page! That’s right — the data can change without even so much as a flicker from the browser.

Flash使您能够在不断变化的过程中显示数据,而无需重新加载或刷新页面! 没错-数据更改几乎不会引起浏览器闪烁。

Ok, so we’ve covered the advantages of this technology. Now, let’s look at the weaknesses of Flash.

好的,所以我们已经介绍了这项技术的优势。 现在,让我们看一下Flash的弱点。

Flash’s Weaknesses

Flash的弱点

Plug-In Required

需要插件

Flash movies still require a separate plug-in installation in order to run in most browsers. Many companies do not allow their employees to install applications on their computers, which automatically denies some Flash site owners access to a portion of their potential userbase.

Flash电影仍需要单独安装插件才能在大多数浏览器中运行。 许多公司不允许员工在计算机上安装应用程序,这会自动拒绝某些Flash网站所有者访问其部分潜在用户群的权限。

Video Woes

视频问题

Video compression and playback in Flash MX is not of the same quality as some of the players developed exclusively for this purpose, such as QuickTime. For example, Flash video does not take advantage of enhanced video drivers for optimized playback at enlarged sizes.

Flash MX中的视频压缩和播放与某些专门为此目的开发的播放器(例如QuickTime)的质量不同。 例如,Flash视频没有利用增强的视频驱动程序来以放大的尺寸优化播放。

Search Engine Issues

搜索引擎问题

Typical Web search engines (or spiders) cannot index content within Flash movies. If you create a 100% Flash-based Website, you may want to provide some text or HTML, displayed or hidden, on your Web pages if you want your content to be indexed by search engines. When I say hidden, I mean that the content should be available via a no script tag or other means that is search engine acceptable. This is perhaps the biggest shortcoming of Flash, and yes — it’s a biggie.

典型的Web搜索引擎(或蜘蛛)无法为Flash电影中的内容编制索引。 如果您创建一个100%基于Flash的网站,则如果希望内容被搜索引擎索引,则可能需要在网页上提供一些显示或隐藏的文本或HTML。 当我说隐藏时,我的意思是内容应该通过无脚本标记或搜索引擎可接受的其他方式获得。 这也许是Flash的最大缺点,是的-这是一个大问题。

Lack of Screen Reader Support

缺少屏幕阅读器支持

Although the integration of MSAA compatibility into Flash Player 6 is a big step forward, and has been heralded by accessibility experts, many kinds of screen readers do not support MSAA of the Flash Player yet.

尽管将MSAA兼容性集成到Flash Player 6中是向前迈出的一大步,并且已由可访问性专家预言,但是许多屏幕阅读器尚不支持Flash Player的MSAA。

Print Problems

打印问题

If your site is based around delivering text-based information to the viewer, then don’t distract or delay them from getting what they want with unnecessary animations. Printing and selecting text in Flash movies is often not as simple (or familiar) to users as that on HTML sites.

如果您的网站基于向查看者提供基于文本的信息,那么不要分散或延迟他们获得不必要的动画所需的内容。 对于用户而言,在Flash电影中打印和选择文本通常不像在HTML网站上那样简单(或熟悉)。

CSS提高 (CSS Steps Up)

The growing trend on the Web today is to separate design from content. So let’s give thanks to CSS — after all, separating these two elements is what CSS was envisioned to do, and what it now achieves so well. CSS allows you to create the look and format of a Website without affecting your content. You, the developer, benefit, as do search-engine spiders and text readers.

当今Web上的增长趋势是将设计与内容分离。 因此,让我们感谢CSS吧-毕竟,将这两个元素分开是CSS所要做的,并且它现在已经取得了很好的成就。 CSS允许您创建网站的外观和格式,而不会影响您的内容。 您(开发人员)将从中受益,搜索引擎蜘蛛和文本阅读器也将从中受益。

In addition, CSS makes Website maintenance easier. With a single modification to an external CSS file you can effect a change across multiple pages of your site. For an in-depth look at CSS be sure to check out SitePoint’s great CSS resources, including their book on the topic.

另外,CSS使网站维护更加容易。 只需对外部CSS文件进行一次修改,就可以跨站点的多个页面进行更改。 要深入了解CSS,请务必查看SitePoint的出色CSS资源 ,包括有关主题的书 。

CSS has the ability to serve up content in its purest form, which makes this technology well-suited for delivering pure content to search engines and legible text to text-only readers. Combined with the power CSS provides site owners to make modifications across their entire site by changing a single file, it’s easy to see why so many people have fallen in love with this technology.

CSS能够以最纯净的形式提供内容,这使得该技术非常适合于向搜索引擎提供纯净的内容以及向纯文本阅读器提供清晰的文本。 结合CSS的强大功能,站点所有者可以通过更改单个文件在整个站点上进行修改,很容易看出为什么这么多人爱上了这项技术。

…but is it all a bed of roses? Not so fast there, CSS!

…但这全是玫瑰花吗? CSS没那么快!

快闪 (Flash Forward)

Think for a moment of all those things CSS gives you — those benefits that made you fall in love with CSS, including search engine-ready content, text reader accessibility, and the ability to modify the look of your entire Website from a single file…

想一想CSS为您提供的所有这些功能-让您爱上CSS的那些好处,包括搜索引擎就绪的内容,文本阅读器的可访问性以及从单个文件修改整个网站外观的能力……

Guess what? It’s quite conceivable that in the not-too-distant future, Flash will also provide you with these capabilities.

你猜怎么了? 可以想象,在不久的将来,Flash也将为您提供这些功能。

Tim Mayer, Vice President of Web Search at FAST explains, “Search engines were originally built to index and serve HTML documents, but now the Web has become more diverse in content types, knowing how to treat Flash and other types of content has become more important for search engines."

FAST网站搜索副总裁Tim Mayer解释说:“搜索引擎最初是为索引和提供HTML文档而构建的,但是现在Web的内容类型变得更加多样化,知道如何处理Flash和其他类型的内容也变得越来越多。对于搜索引擎很重要。”

Mayer notes that, “FAST built its Flash indexing capabilities using the Macromedia’s Flash search engine software developer’s kit (SDK). The SDK was designed to convert a Flash file’s text and links into HTML for indexing.”

Mayer指出:“ FAST使用Macromedia的Flash搜索引擎软件开发人员工具包(SDK)构建了Flash索引功能。 该SDK旨在将Flash文件的文本和链接转换为HTML以建立索引。”

However, not all search engine spiders have the ability to crawl or index Flash. As far as I’m able to determine, Google has not included the Flash-SDK setup for indexing the way FAST has. But Google can follow embedded links.

但是,并非所有搜索引擎蜘蛛都可以对Flash进行爬网或编制索引。 据我所能确定的,Google尚未包含Flash-SDK设置来建立FAST索引的索引。 但是Google可以跟踪嵌入式链接。

The Macromedia SDK solution is far from perfect and still has a long way to come. However, we can see that search engines are making an effort to embrace Flash and I believe that in the future we’ll see Flash make an effort to embrace search engines.

Macromedia SDK解决方案远非完美,但还有很长的路要走。 但是,我们可以看到搜索引擎正在努力拥抱Flash,并且我相信在将来,我们会看到Flash在努力拥抱搜索引擎。

It’s conceivable that before too long, search engines will see only the content of a site — they won’t care what that site looks like. The content will be separate from the movie and could even be marked up with HTML tags or XML. This provides the designer with the ability to have their site look however they choose and still have search spiders feast on the content. Search engines will be able to do what humans have always struggled with – they’ll have the ability to see past the outward appearance and get to what’s really important.

可以想象,不久之后,搜索引擎将只能看到站点的内容,而不必关心站点的外观。 内容将与电影分开,甚至可以用HTML标记或XML进行标记。 这使设计师能够选择自己的网站,但是他们仍然选择并且仍然使搜索蜘蛛大饱眼福。 搜索引擎将能够做人类一直在努力的事情–他们将能够看到过去的外观并了解真正重要的内容。

It’s also worth noting that when this day comes — and all signs point that it will come sooner rather than later — not only will search engines get close to your Flash content, the text readers will also find it more accessible.

还要注意的是,这一天到来时-所有迹象都表明它会早于而不是晚-搜索引擎不仅会接近您的Flash内容,而且文本阅读器也会发现它更易于访问。

Lastly, Flash, like CSS, also allows users to modify a single external text file and in so doing, make changes across an entire site. Because Flash stores all the elements of a movie in a library file, you can easily make sweeping modifications across an entire site or, with Flash’s shared library feature, multiple Websites. The Future is Bright for Flash

最后,Flash与CSS一样,也允许用户修改单个外部文本文件,从而在整个站点上进行更改。 由于Flash将电影的所有元素存储在库文件中,因此您可以轻松地在整个网站上进行全面修改,或者使用Flash的共享库功能,可以轻松地对多个网站进行修改。 Flash的未来是光明的

Remember my original statement, “HTML and CSS will never be able to do what Flash does”? While this is true, it’s quite possible that in the future, Flash will be able to achieve what HTML and CSS do. The short comings of Flash as outlined above may not be present in the near future. It’s conceivable that Flash will be able to separate content from design, and serve up pure content to the search engines and text readers; after all, Macromedia is working on these problems right now.

还记得我最初的说法:“ HTML和CSS将永远无法完成Flash的工作”? 尽管这是事实,但将来很有可能Flash将能够实现HTML和CSS的功能。 如上所述的Flash的缺点可能在不久的将来不复存在。 可以想象,Flash能够将内容与设计分开,并为搜索引擎和文本阅读器提供纯内容。 毕竟,Macromedia现在正在解决这些问题。

A day will come when a typical Flash site will be as friendly to search engines as are its HTML/CSS counterparts; it may even surpass HTML and CSS sites in terms of accessibility, for the simple reason that it supports sound and video.

有一天,一个典型的Flash站点将对它HTML / CSS对应站点一样对搜索引擎友好; 就其可访问性而言,它甚至可以超过HTML和CSS网站,原因很简单,因为它支持声音和视频。

Flash at least has a chance to fix its weaknesses, and in time will likely do so. But HTML and CSS will never be able to do what Flash does!

Flash至少有机会修复其弱点,并且很可能会及时修复。 但是HTML和CSS将永远无法完成Flash的工作!

翻译自: https://www.sitepoint.com/csshtml-which-will-choose/

css 闪光

最新回复(0)