Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

So IE has an icon where Flash SWF embeds used to be, how do I get something similar in FF?

  • 5 trả lời
  • 1 gặp vấn đề này
  • 10 lượt xem
  • Trả lời mới nhất được viết bởi Sync

more options

Subject line says it all. I am discovering that FF 84.02 just leaves a blank spot where the Flash SWF used to be, making pages super confusing to view if they used to have a SWF on them because you frequently don't even know what the page was supposed to do.

Is there any way to get some sort of placeholder graphic like IE has? Or if not, are there plans to implement one?

Đính kèm ảnh chụp màn hình

Tất cả các câu trả lời (5)

more options

That is an interesting idea.

The two tags typically used to embed Flash content are:

  • <object type="application/x-shockwave-flash">
  • <embed type="application/x-shockwave-flash"> (type isn't always included)

If the author included "fallback" content, then Firefox will display that instead, but if there was no fallback content, the object will just collapse and not be visible.

I don't know whether there is a web standard dictating that the object/embed disappear when it can't run. If not, then something else could be displayed. I suspect that might take a while to get approved, so in the short run, some kind of add-on or custom style rule might be a useful workaround.

Hữu ích?

more options

Along the lines of the last reply, this style rule marks missing Flash objects that have the prescribed type with a little message. An icon could be prettier, but...

object[type="application/x-shockwave-flash"]::before, 
embed[type="application/x-shockwave-flash"]::before {
  content: "Flash";
  padding: 2px 6px;
  color: #ff0;
  background-color: #444;
  border: 3px dotted #ff0 !important;
}
 

You can test this on any page using the Style Editor tool:

  • Press Shift+F7 to open the developer tools to the Style Editor
  • Above the file list on the left side, click the + button to create a new sheet
  • Paste the rule, and Firefox should apply it to the page within a few moments

Sample screenshot attached.

Hữu ích?

more options

Wow, thanks for this! This is a really cool idea and would probably solve the problem within our own website at a minimum.

I've never really played with ::before tags, alas. Is there a way to center that within the space that the old SWF would have taken though? Due to floating placement of the SWF the first time I tried it, it appears floating within a bunch of other text, naturally.

Hữu ích?

more options

Hmm, good question. What I noticed on the test page is that the width of the Flash object was collapsed to 0 instead of retaining the originally prescribed width, so I'm not sure how to maintain that.

Of course, if it's your own site, you can insert fallback content into the object tag like this (but obviously something nicer):

<object type="application/x-shockwave-flash"><div style="text-align: center">Flash is dead.</div></object>

Hữu ích?

more options

Argh, yeah I see what you mean. Will consider some way to push that fix too.

Well hopefully it won't be a problem for long anyway. We got like all but about twenty out of thousands of SWFs converted the HTML5 Canvas successfully. There were just a few that slipped through the cracks.

Thanks for your help! Would still be nice to see FF implement something to alert the user that something was supposed to be on the page, haha.

Hữu ích?

Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.