Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Flash? How do YOU embed it?

Featured Replies

There is much discussion over embedding Flash but my primary goal is that however it is embedded it validates to W3C. Now some may not see this as an issue but for me it is. I have a bug-bear regarding good coding and making pages that are 100%.

 

So how do you embed Flash? I would love to hear different opinions and views on this subject.

 

Whilst on my own site I have now toned down the flash content I maintain it on so many other sites. So how do I embed, let's say a banner.

 

Well my code without the painful <object blah, blah blah>, is quite simple:

 

<div id="Banner"></div>

 

The only variants are e.g.: <div align="left" id="Banner"></div>, <div align="center" id="Banner"></div>, <div align="right" id="Banner"></div>

 

This references an external single javascript file which is cross browser friendly and displays 100% across all browsers.

 

I worked on a collaboration of this a few years ago and still love the way it works and its simplicity. One minor variation is using a W3C version of traditional code for a "transparent" flash background.

 

So how do you embed Flash?

There are several ways to code Flash into a web page. The reason many companies like YouTube still use the object and nested embed tag method which doesn't validate is that it works on old browsers with no delay.

 

The method that validates needs the receiving computer to have Adobe Flash already installed, if not a popup recommends downloading and installing which takes time.

 

See http://www.wickham43.net/flashvideo.php item 2 validates, items 1a and 1b don't.

 

The new CSS3 <video> tag may work when CSS3 is finally released and browsers are up to date, but that will take some time and as far as I can see, the video tag is for other video formats so far excluding .swf (according to the Mozilla developer site the video tags have to have an object tag inside with the Flash file url which really means that you don't need the video tag, except possibly for any styles in it).

  • Author

Hi Wickham,

 

Thanks for taking time to add your comments and I enjoyed reading through your page. I must admit I hate the standard methods for embedding Flash and whilst new to the forum thought I would ask for other opinions.

 

Regarding my method I have taken the liberty to demonstrate it here and will of course DELETE this file shortly and trust I haven't intruded.

 

Take a look at the source code below. Valid in all Browsers, (except iPhone, lol!).

 

http://www.ricrod.com/Happy-New-Year.html

 

I should appreciate your comments.

Your javascript method validates and works in Firefox and IE7 so that's fine. I said that there were lots of methods.

HTML5 is reintroducing the embed tag which would probably be best .swf, the format would be something like this:

 

<embed src="flash.swf" width="600" height="900" />

 

I wrote a short tutorial on how to embed flash within different versions of (x)html

Embedding Flash into HTML (nothing like a shameless plug for a site :p )

 

Its a little different to the ones already shared so I thought I might as well share it, plus there is no harm in a shameless plug for my site :p

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.