2

All my sites need to be search engine friendly - ie readable by search engines. However, I kind of like flash and would like to integrate it in a friendly way.

I have the option of swfobject, which allows proper page names and serves different pages to the user vs search engine.

However, I am wondering why there would be a need to use swfobject. For instance, I could just use a normal php cms page and insert flash elements into it. When the page is called by a search engine, just serve the pure html, whereas a user would get the flash.

I'd really appreciate to find out other points of view on this subject and the benefits of the different approaches.

Many thanks

K

Ke.
  • 2,484
  • 8
  • 40
  • 78
  • But why couldn't you do *both*? Ie using a PHP CMS to display pages and embed Flash into those, using SWFObject. – dain Jun 02 '11 at 11:45
  • yes, thats kind of what im asking. Some websites I have seen have opted to use swfadress with swfobject, to get friendly urls in flash. However, im wondering what is the point? when you can just embed piece of flash in your content anyway? I am wondering what the benefits of one vs the other? – Ke. Jun 02 '11 at 13:25
  • The benefit is that if you navigate with SWFAddress there's no page reload, so you can have seamless transitions between sections (as opposed to have a second of flicker if the browser has to reinitialise the Flash plugin). It's a similar kind of thing as AJAX vs static pages, both a mixed bag, depends on your goals. – dain Jun 02 '11 at 13:34

1 Answers1

6

First of all, the html code you have to write to embed an swf file is different for some browsers.

Firefox, Chrome, .. use <object> tags while IE uses <embed> tags.

SWFObject is a javascript 'library' (kinda silly since it is only one file :P) that can inject the proper html tags directly into the DOM tree, and handles those browser differences for you.

Furthermore there were some security concerns for flash cross site scriptings attacks in the past.

I know for a fact that in older Flex Builder versions there were problems with the generated html-templates which could potentially cause major security issues.

Nowadays in newer versions of Flash Builder, Adobe uses SWFObject by default to create html wrapper files.

So, to answer your question:

Is it really necessary? No, it's not if you know what you are doing. Is it convenient and an Adobe standard, yes it is.

Cheers

Dennis Jaamann
  • 3,547
  • 2
  • 23
  • 42