Web Design Forum: Flash? How do YOU embed it? - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Flash? How do YOU embed it?

#1 User is offline   ricrod 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 67
  • Joined: 21-October 10
  • Reputation: 1
  • Gender:Male
  • Location:Norfolk UK
  • Experience:Advanced
  • Area of Expertise:Designer/Coder

Posted 23 October 2010 - 01:53 PM

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?
0

#2 User is offline   Wickham 

  • Web Guru
  • View gallery
  • Group: Moderators
  • Posts: 2,875
  • Joined: 11-June 09
  • Reputation: 257
  • Gender:Male
  • Location:Salisbury UK
  • Experience:Intermediate
  • Area of Expertise:Web Developer

Posted 23 October 2010 - 02:26 PM

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.../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).
0

#3 User is offline   ricrod 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 67
  • Joined: 21-October 10
  • Reputation: 1
  • Gender:Male
  • Location:Norfolk UK
  • Experience:Advanced
  • Area of Expertise:Designer/Coder

Posted 23 October 2010 - 02:56 PM

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.co...y-New-Year.html

I should appreciate your comments.
0

#4 User is offline   Wickham 

  • Web Guru
  • View gallery
  • Group: Moderators
  • Posts: 2,875
  • Joined: 11-June 09
  • Reputation: 257
  • Gender:Male
  • Location:Salisbury UK
  • Experience:Intermediate
  • Area of Expertise:Web Developer

Posted 23 October 2010 - 05:23 PM

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

#5 User is offline   Dizi 

  • Queen of the Spammers
  • PipPipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 5,654
  • Joined: 13-August 07
  • Reputation: 161
  • Gender:Female
  • Location:Newcastle, UK
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 23 October 2010 - 07:53 PM

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
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users