SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Downloaden Sie, um offline zu lesen
Bobby van der Sluis
FITC Amsterdam, 26th February 2008
Many Flash embed methods
• Twice cooked     • Adobe Flash Player
                     Detection Kit
• Embed only
                   • SWFObject
• Flash Satay
                   • Unobtrusive Flash
• Nested objects
                     Objects (UFO)
  (Hixie)
                   • ObjectSwap
                   • Many, many other
                     scripts...
Some methods are on the road to nowhere;
        none of them are optimal
The                 project

  Geoff Stearns
  SWFObject


  Bobby van der Sluis
  Unobtrusive Flash Objects (UFO)


  Michael Williams
  Adobe Flash Player Detection Kit
8 key questions
             1. How to embed cross-browser?
          2. How to comply with web standards?
          3. What if no Flash plug-in is available?
      4. How to deal with an outdated Flash plug-in?
      5. Where to download the latest Flash plug-in?
              6. How to help search engines?
7. How to avoid mechanisms that hurt the user experience?
    8. How to do all of this in the easiest way possible?
8 key questions
             1. How to embed cross-browser?
          2. How to comply with web standards?
          3. What if no Flash plug-in is available?
      4. How to deal with an outdated Flash plug-in?
      5. Where to download the latest Flash plug-in?
              6. How to help search engines?
7. How to avoid mechanisms that hurt the user experience?
    8. How to do all of this in the easiest way possible?
Cross-browser anno 1998
Netscape’s <embed>

  <embed type=quot;application/x-shockwave-flashquot;
  src=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot; />


• Is patented and therefore not a web standard
• Invalid HTML
• Doesn’t support alternative content
Alternative content



Content that is accessible to people who
   browse the web without plugins
Internet Explorer’s <object>
  <object classid=quot;clsid:D27CDB6E-
  AE6D-11cf-96B8-444553540000quot; width=quot;780quot;
  height=quot;390quot;>
    <param name=quot;moviequot; value=quot;myContent.swfquot; />
    <p>Alternative content</p>
  </object>


• Is a W3C Recommendation
• Supports alternative content
• Is a platform specific implementation
Twice cooked
  <object classid=quot;clsid:D27CDB6E-
  AE6D-11cf-96B8-444553540000quot; width=quot;780quot;
  height=quot;390quot;>
    <param name=quot;moviequot; value=quot;myContent.swfquot; />
    <embed type=quot;application/x-shockwave-flashquot;
    src=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot; />
  </object>


• Locked into vendor specific code
• No alternative content possible
• This is still the default publishing method of
  the Flash IDE today
Web standards
 offer a universal language to a whole ecosystem
of browser makers, tool builders, and web authors,
       so that all of these audiences can avoid
      compatibility problems, vendor lock-ins,
          and patent-infringement issues.
Cross-browser today
All modern web browsers support a platform
independent implementation of <object>
<object type=quot;application/x-shockwave-flashquot;
data=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot;>
    <p>Alternative content</p>
</object>


Except Microsoft Internet Explorer
<object classid=quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000quot;
width=quot;780quot; height=quot;390quot;>
   <param name=quot;moviequot; value=quot;myContent.swfquot; />
   <p>Alternative content</p>
</object>
Nested objects

<object classid=quot;clsid:D27CDB6E-
AE6D-11cf-96B8-444553540000quot; width=quot;780quot; height=quot;390quot;>
   <param name=quot;moviequot; value=quot;myContent.swfquot; />


  <object type=quot;application/x-shockwave-flashquot;
  data=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot;>

     <p>Alternative content</p>


  </object>

</object>
Nested objects - take 2

<object classid=quot;clsid:D27CDB6E-
AE6D-11cf-96B8-444553540000quot; width=quot;780quot; height=quot;390quot;>
   <param name=quot;moviequot; value=quot;myContent.swfquot; />
   <!--[if !IE]>-->
   <object type=quot;application/x-shockwave-flashquot;
   data=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot;>
   <!--<![endif]-->
      <p>Alternative content</p>
   <!--[if !IE]>-->
   </object>
   <!--<![endif]-->
</object>
Why nested objects is better
    than twice cooked


• It breaks the cycle of vendor lock-in
• Valid HTML
• The opportunity to use alternative content
Markup vs scripting


• Around 98% of the people has Flash Player 8
• Around 5% has no JavaScript support
• Around 1% has poor JavaScript support
8 key questions
             1. How to embed cross-browser?
          2. How to comply with web standards?
          3. What if no Flash plug-in is available?
      4. How to deal with an outdated Flash plug-in?
      5. Where to download the latest Flash plug-in?
              6. How to help search engines?
7. How to avoid mechanisms that hurt the user experience?
    8. How to do all of this in the easiest way possible?
The Flash Player will attempt to play
            Flash content,
no matter what Flash plugin version that
       content was published for
Flash Player version detection

 Use JavaScript to:
 • Detect the Flash Player version
 • Determine whether Flash content or
   alternative content needs to be shown
 • Trigger Adobe Express Install (optional)
Adobe Express Install
The old way of downloading




 <embed ... pluginspage=quot;http://www.macromedia.com/
 go/getflashplayerquot; />
The old way of downloading
The old way of downloading




 <object ... codebase=quot;http://
 fpdownload.macromedia.com/pub/shockwave/cabs/flash/
 swflash.cab#version=8,0,0,0quot;>
The old way of downloading
The modern way of
          downloading

• Use alternative content
• Use Adobe Express Install (optional)
• Rely on browser built-in mechanisms (based
  on MIME type invocation)
8 key questions
             1. How to embed cross-browser?
          2. How to comply with web standards?
          3. What if no Flash plug-in is available?
      4. How to deal with an outdated Flash plug-in?
      5. Where to download the latest Flash plug-in?
              6. How to help search engines?
7. How to avoid mechanisms that hurt the user experience?
    8. How to do all of this in the easiest way possible?
Doesn’t Google index Flash content?
Search engines and Flash
           content
• Not all search engines index Flash content
• Search engines are far more optimized to
  index HTML pages than Flash content
• Flash indexing itself is limited: merely flat
  content in a specific order; it lacks the
  hierarchical structure and the semantics of
  HTML
Strategies to help search
        engines


1. Use alternative content
2. Use Sitemaps and robots.txt
8 key questions
             1. How to embed cross-browser?
          2. How to comply with web standards?
          3. What if no Flash plug-in is available?
      4. How to deal with an outdated Flash plug-in?
      5. Where to download the latest Flash plug-in?
              6. How to help search engines?
7. How to avoid mechanisms that hurt the user experience?
    8. How to do all of this in the easiest way possible?
Active content


• Eolas - Microsoft patent dispute
• A user-unfriendly workaround by Microsoft
  and Opera to avoid claims
• Affects Internet Explorer 6+ and Opera 9+
Click-to-activate mechanism
Avoiding active content



  Publish your Flash content
       with JavaScript
No more active content?

• Microsoft has settled with Eolas
• 2008 onwards: click-to-activate mechanism is
  removed from Internet Explorer via update
• Opera to follow?
• Apple and Opera to be sued next?
8 key questions
             1. How to embed cross-browser?
          2. How to comply with web standards?
          3. What if no Flash plug-in is available?
      4. How to deal with an outdated Flash plug-in?
      5. Where to download the latest Flash plug-in?
              6. How to help search engines?
7. How to avoid mechanisms that hurt the user experience?
    8. How to do all of this in the easiest way possible?
SWFObject 2.0


• Static publishing method
• Dynamic publishing method
• JavaScript API
• Only utilizes 1 JavaScript file (9.2 Kb)
Static publishing method


   Embed Flash content and alternative content
        using standards compliant markup,
and use unobtrusive JavaScript to resolve the issues
          that markup alone cannot solve
Static publishing - step 1

<object id=quot;myIdquot; classid=quot;clsid:D27CDB6E-
AE6D-11cf-96B8-444553540000quot; width=quot;780quot; height=quot;390quot;>
  <param name=quot;moviequot; value=quot;myContent.swfquot; />
  <!--[if !IE]>-->
  <object type=quot;application/x-shockwave-flashquot;
  data=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot;>
  <!--<![endif]-->
     <p>Alternative content</p>
  <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object>
Static publishing - step 2



<script type=quot;text/javascriptquot; src=quot;swfobject.jsquot;></script>
Static publishing - step 3



<script type=quot;text/javascriptquot;>
swfobject.registerObject(quot;myIdquot;, quot;9.0.0quot;);
</script>
Dynamic publishing method


     Create alternative content using
 standards compliant markup and embed
Flash content with unobtrusive JavaScript
Dynamic publishing - step 1



<div id=quot;myIdquot;>

   <p>Alternative content</p>
</div>
Dynamic publishing - step 2



<script type=quot;text/javascriptquot; src=quot;swfobject.jsquot;></script>
Dynamic publishing - step 3


<script type=quot;text/javascriptquot;>
swfobject.embedSWF(quot;myContent.swfquot;, quot;myIdquot;, quot;780quot;, quot;390quot;,
quot;9.0.0quot;);
</script>
JavaScript API
•   swfobject.registerObject(...)
•   swfobject.embedSWF(...)


•   swfobject.getObjectById(...)
•   swfobject.getFlashPlayerVersion()
•   swfobject.hasFlashPlayerVersion(...)
•   swfobject.addLoadEvent(...)
•   swfobject.addDomLoadEvent(...)
•   swfobject.createSWF(...)
•   swfobject.createCSS(...)
•   swfobject.getQueryParamValue(...)
SWFObject 2.0 and browser
      integration
• As usual, e.g.:
    - Adobe External Interface
    - SWFAddress 2.0
    - AS3.0 MouseWheel on Mac OSX
• One catch with static publishing:
      Use swfobject.getObjectById(quot;myIdquot;) to
      retrieve the active <object>
SWFObject 2.0 and
         accessibility
• Create Flash content (for visitors with the
  right plug-in/JavaScript support)
• Create alternative HTML content (for visitors
  that don’t have the right support)
• Make your Flash content accessible
• Make your HTML content accessible
Links
        This presentation will soon be posted at:
           http://www.bobbyvandersluis.com

                    SWFObject 2.0:
         http://code.google.com/p/swfobject/

           SWFFix/SWFObject 2.0 dev blog:
               http://www.swffix.org

              Flash embedding cage match:
http://www.alistapart.com/articles/flashembedcagematch/

             Flash Player embed test suite:
            http://www.swffix.org/testsuite/

Weitere ähnliche Inhalte

Was ist angesagt?

Building Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with DrupalBuilding Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with Drupal
Four Kitchens
 
Smart Sheriff, Dumb Idea, the wild west of government assisted parenting
Smart Sheriff, Dumb Idea, the wild west of government assisted parentingSmart Sheriff, Dumb Idea, the wild west of government assisted parenting
Smart Sheriff, Dumb Idea, the wild west of government assisted parenting
Abraham Aranguren
 
Doctype html
Doctype htmlDoctype html
Doctype html
Eddy_TKJ
 

Was ist angesagt? (20)

Mobile applications for SharePoint using HTML5
Mobile applications for SharePoint using HTML5Mobile applications for SharePoint using HTML5
Mobile applications for SharePoint using HTML5
 
Swf search final
Swf search finalSwf search final
Swf search final
 
Responsive Images and Video
Responsive Images and VideoResponsive Images and Video
Responsive Images and Video
 
Edge of the Web
Edge of the WebEdge of the Web
Edge of the Web
 
Intro to Web Development
Intro to Web DevelopmentIntro to Web Development
Intro to Web Development
 
A Period of Transition
A Period of TransitionA Period of Transition
A Period of Transition
 
(For non-developers) HTML5: A richer web for everyone
(For non-developers) HTML5: A richer web for everyone(For non-developers) HTML5: A richer web for everyone
(For non-developers) HTML5: A richer web for everyone
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can build
 
Hungarian Web Conference: HTML5 beyond the hype - let's make it work!
Hungarian Web Conference: HTML5 beyond the hype - let's make it work!Hungarian Web Conference: HTML5 beyond the hype - let's make it work!
Hungarian Web Conference: HTML5 beyond the hype - let's make it work!
 
Building Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with DrupalBuilding Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with Drupal
 
Autoscalable open API testing
Autoscalable open API testingAutoscalable open API testing
Autoscalable open API testing
 
Truth About HTML5
Truth About HTML5Truth About HTML5
Truth About HTML5
 
Progressive Web Apps - Goto Chicago 2017
Progressive Web Apps - Goto Chicago 2017Progressive Web Apps - Goto Chicago 2017
Progressive Web Apps - Goto Chicago 2017
 
Common WordPress mistakes (and more)
Common WordPress mistakes (and more)Common WordPress mistakes (and more)
Common WordPress mistakes (and more)
 
Legal and efficient web app testing without permission
Legal and efficient web app testing without permissionLegal and efficient web app testing without permission
Legal and efficient web app testing without permission
 
Smart Sheriff, Dumb Idea, the wild west of government assisted parenting
Smart Sheriff, Dumb Idea, the wild west of government assisted parentingSmart Sheriff, Dumb Idea, the wild west of government assisted parenting
Smart Sheriff, Dumb Idea, the wild west of government assisted parenting
 
Free technologies
Free technologiesFree technologies
Free technologies
 
Disruptive code
Disruptive codeDisruptive code
Disruptive code
 
Doctype html
Doctype htmlDoctype html
Doctype html
 
Web Accessibility - A feature you can build
Web Accessibility - A feature you can buildWeb Accessibility - A feature you can build
Web Accessibility - A feature you can build
 

Andere mochten auch

Technology Is Not Neutral: How Bible Technology Shapes Our Faith
Technology Is Not Neutral: How Bible Technology Shapes Our FaithTechnology Is Not Neutral: How Bible Technology Shapes Our Faith
Technology Is Not Neutral: How Bible Technology Shapes Our Faith
John Dyer
 
Talis Insight Asia-Pacific 2017: Simon Bedford, University of Wollongong
Talis Insight Asia-Pacific 2017: Simon Bedford, University of WollongongTalis Insight Asia-Pacific 2017: Simon Bedford, University of Wollongong
Talis Insight Asia-Pacific 2017: Simon Bedford, University of Wollongong
Talis
 
Talis Insight Asia-Pacific 2017: Craig Milne, Griffith University
Talis Insight Asia-Pacific 2017: Craig Milne, Griffith UniversityTalis Insight Asia-Pacific 2017: Craig Milne, Griffith University
Talis Insight Asia-Pacific 2017: Craig Milne, Griffith University
Talis
 
Talis Insight Asia-Pacific 2017: Reading lists: academic adoption at Griffith
Talis Insight Asia-Pacific 2017: Reading lists: academic adoption at GriffithTalis Insight Asia-Pacific 2017: Reading lists: academic adoption at Griffith
Talis Insight Asia-Pacific 2017: Reading lists: academic adoption at Griffith
Talis
 
Talis Insight Asia-Pacific 2017: Victoria University of Wellington
Talis Insight Asia-Pacific 2017: Victoria University of WellingtonTalis Insight Asia-Pacific 2017: Victoria University of Wellington
Talis Insight Asia-Pacific 2017: Victoria University of Wellington
Talis
 
Talis Academic Adoption Presentation February 2015
Talis Academic Adoption Presentation February 2015Talis Academic Adoption Presentation February 2015
Talis Academic Adoption Presentation February 2015
Talis
 
Talis Insight Asia-Pacific 2017: Caroline Ondracek, Griffith University
Talis Insight Asia-Pacific 2017: Caroline Ondracek, Griffith UniversityTalis Insight Asia-Pacific 2017: Caroline Ondracek, Griffith University
Talis Insight Asia-Pacific 2017: Caroline Ondracek, Griffith University
Talis
 
Monash - Talis Aspire User Group presentation
Monash - Talis Aspire User Group presentationMonash - Talis Aspire User Group presentation
Monash - Talis Aspire User Group presentation
Talis
 
Talis Insight Asia-Pacific 2017: Anne Kealley CEO, Caudit
Talis Insight Asia-Pacific 2017: Anne Kealley CEO, CauditTalis Insight Asia-Pacific 2017: Anne Kealley CEO, Caudit
Talis Insight Asia-Pacific 2017: Anne Kealley CEO, Caudit
Talis
 
Deakin University Presentation - Talis Aspire User Group February 2015
Deakin University Presentation - Talis Aspire User Group February 2015Deakin University Presentation - Talis Aspire User Group February 2015
Deakin University Presentation - Talis Aspire User Group February 2015
Talis
 
Talis Insight Asia-Pacific 2017: Nicole Healy, QUT
Talis Insight Asia-Pacific 2017: Nicole Healy, QUTTalis Insight Asia-Pacific 2017: Nicole Healy, QUT
Talis Insight Asia-Pacific 2017: Nicole Healy, QUT
Talis
 
Distance Learning and Scale - Rod Rizzi, Monash University
Distance Learning and Scale - Rod Rizzi, Monash UniversityDistance Learning and Scale - Rod Rizzi, Monash University
Distance Learning and Scale - Rod Rizzi, Monash University
Talis
 
Talis Insight Asia-Pacific 2017: Rodney Tamblyn, Talis
Talis Insight Asia-Pacific 2017: Rodney Tamblyn, TalisTalis Insight Asia-Pacific 2017: Rodney Tamblyn, Talis
Talis Insight Asia-Pacific 2017: Rodney Tamblyn, Talis
Talis
 
Insight Asia-Pacific 2017: Talis Keynote
Insight Asia-Pacific 2017: Talis KeynoteInsight Asia-Pacific 2017: Talis Keynote
Insight Asia-Pacific 2017: Talis Keynote
Talis
 
Talis Insight Asia-Pacific 2017: Kim Tairi, AUT
Talis Insight Asia-Pacific 2017: Kim Tairi, AUTTalis Insight Asia-Pacific 2017: Kim Tairi, AUT
Talis Insight Asia-Pacific 2017: Kim Tairi, AUT
Talis
 

Andere mochten auch (20)

HTML5 and friends
HTML5 and friendsHTML5 and friends
HTML5 and friends
 
Technology Is Not Neutral: How Bible Technology Shapes Our Faith
Technology Is Not Neutral: How Bible Technology Shapes Our FaithTechnology Is Not Neutral: How Bible Technology Shapes Our Faith
Technology Is Not Neutral: How Bible Technology Shapes Our Faith
 
Be here when - communities and how they use technology to design themselves
Be here when - communities and how they use technology to design themselvesBe here when - communities and how they use technology to design themselves
Be here when - communities and how they use technology to design themselves
 
Social Business By Design
Social Business By DesignSocial Business By Design
Social Business By Design
 
Talis Insight Asia-Pacific 2017: Simon Bedford, University of Wollongong
Talis Insight Asia-Pacific 2017: Simon Bedford, University of WollongongTalis Insight Asia-Pacific 2017: Simon Bedford, University of Wollongong
Talis Insight Asia-Pacific 2017: Simon Bedford, University of Wollongong
 
Talis Insight Asia-Pacific 2017: Craig Milne, Griffith University
Talis Insight Asia-Pacific 2017: Craig Milne, Griffith UniversityTalis Insight Asia-Pacific 2017: Craig Milne, Griffith University
Talis Insight Asia-Pacific 2017: Craig Milne, Griffith University
 
Talis Insight Asia-Pacific 2017: Reading lists: academic adoption at Griffith
Talis Insight Asia-Pacific 2017: Reading lists: academic adoption at GriffithTalis Insight Asia-Pacific 2017: Reading lists: academic adoption at Griffith
Talis Insight Asia-Pacific 2017: Reading lists: academic adoption at Griffith
 
Talis Insight Asia-Pacific 2017: Victoria University of Wellington
Talis Insight Asia-Pacific 2017: Victoria University of WellingtonTalis Insight Asia-Pacific 2017: Victoria University of Wellington
Talis Insight Asia-Pacific 2017: Victoria University of Wellington
 
Talis Academic Adoption Presentation February 2015
Talis Academic Adoption Presentation February 2015Talis Academic Adoption Presentation February 2015
Talis Academic Adoption Presentation February 2015
 
Talis Insight Asia-Pacific 2017: Caroline Ondracek, Griffith University
Talis Insight Asia-Pacific 2017: Caroline Ondracek, Griffith UniversityTalis Insight Asia-Pacific 2017: Caroline Ondracek, Griffith University
Talis Insight Asia-Pacific 2017: Caroline Ondracek, Griffith University
 
Monash - Talis Aspire User Group presentation
Monash - Talis Aspire User Group presentationMonash - Talis Aspire User Group presentation
Monash - Talis Aspire User Group presentation
 
Talis Insight Asia-Pacific 2017: Anne Kealley CEO, Caudit
Talis Insight Asia-Pacific 2017: Anne Kealley CEO, CauditTalis Insight Asia-Pacific 2017: Anne Kealley CEO, Caudit
Talis Insight Asia-Pacific 2017: Anne Kealley CEO, Caudit
 
Economia del mare e Blue Growth
Economia del mare e Blue GrowthEconomia del mare e Blue Growth
Economia del mare e Blue Growth
 
Deakin University Presentation - Talis Aspire User Group February 2015
Deakin University Presentation - Talis Aspire User Group February 2015Deakin University Presentation - Talis Aspire User Group February 2015
Deakin University Presentation - Talis Aspire User Group February 2015
 
Talis Insight Asia-Pacific 2017: Nicole Healy, QUT
Talis Insight Asia-Pacific 2017: Nicole Healy, QUTTalis Insight Asia-Pacific 2017: Nicole Healy, QUT
Talis Insight Asia-Pacific 2017: Nicole Healy, QUT
 
Distance Learning and Scale - Rod Rizzi, Monash University
Distance Learning and Scale - Rod Rizzi, Monash UniversityDistance Learning and Scale - Rod Rizzi, Monash University
Distance Learning and Scale - Rod Rizzi, Monash University
 
Talis Insight Asia-Pacific 2017: Rodney Tamblyn, Talis
Talis Insight Asia-Pacific 2017: Rodney Tamblyn, TalisTalis Insight Asia-Pacific 2017: Rodney Tamblyn, Talis
Talis Insight Asia-Pacific 2017: Rodney Tamblyn, Talis
 
Insight Asia-Pacific 2017: Talis Keynote
Insight Asia-Pacific 2017: Talis KeynoteInsight Asia-Pacific 2017: Talis Keynote
Insight Asia-Pacific 2017: Talis Keynote
 
Talis Insight Asia-Pacific 2017: Kim Tairi, AUT
Talis Insight Asia-Pacific 2017: Kim Tairi, AUTTalis Insight Asia-Pacific 2017: Kim Tairi, AUT
Talis Insight Asia-Pacific 2017: Kim Tairi, AUT
 
The Desirability of Connected Products
The Desirability of Connected ProductsThe Desirability of Connected Products
The Desirability of Connected Products
 

Ähnlich wie SWFObject 2: The fine art of embedding Adobe Flash Player content

Rey Bango - HTML5: polyfills and shims
Rey Bango -  HTML5: polyfills and shimsRey Bango -  HTML5: polyfills and shims
Rey Bango - HTML5: polyfills and shims
StarTech Conference
 
Csdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer YahooCsdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer Yahoo
guestb1b95b
 
FITC Spotlight HTML5 - The state of the web
FITC Spotlight HTML5 - The state of the webFITC Spotlight HTML5 - The state of the web
FITC Spotlight HTML5 - The state of the web
Frédéric Harper
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
areyouok
 

Ähnlich wie SWFObject 2: The fine art of embedding Adobe Flash Player content (20)

HTML5
HTML5HTML5
HTML5
 
Html5
Html5 Html5
Html5
 
Rey Bango - HTML5: polyfills and shims
Rey Bango -  HTML5: polyfills and shimsRey Bango -  HTML5: polyfills and shims
Rey Bango - HTML5: polyfills and shims
 
A Brave New World
A Brave New WorldA Brave New World
A Brave New World
 
Csdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer YahooCsdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer Yahoo
 
Yahoo for the Masses
Yahoo for the MassesYahoo for the Masses
Yahoo for the Masses
 
Shifting Gears
Shifting GearsShifting Gears
Shifting Gears
 
White Hat Cloaking
White Hat CloakingWhite Hat Cloaking
White Hat Cloaking
 
Apache Flex and the imperfect Web
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Web
 
Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0
 
Performance Tuning Web Apps - The Need For Speed
Performance Tuning Web Apps - The Need For SpeedPerformance Tuning Web Apps - The Need For Speed
Performance Tuning Web Apps - The Need For Speed
 
Hinting at a better web
Hinting at a better webHinting at a better web
Hinting at a better web
 
FITC Spotlight HTML5 - The state of the web
FITC Spotlight HTML5 - The state of the webFITC Spotlight HTML5 - The state of the web
FITC Spotlight HTML5 - The state of the web
 
Tech 20 Session 10
Tech 20 Session 10Tech 20 Session 10
Tech 20 Session 10
 
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
 
Flash SEO Secrets
Flash SEO SecretsFlash SEO Secrets
Flash SEO Secrets
 
Building Web Hack Interfaces
Building Web Hack InterfacesBuilding Web Hack Interfaces
Building Web Hack Interfaces
 
Worry Free Web Development
Worry Free Web DevelopmentWorry Free Web Development
Worry Free Web Development
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

SWFObject 2: The fine art of embedding Adobe Flash Player content

  • 1. Bobby van der Sluis FITC Amsterdam, 26th February 2008
  • 2. Many Flash embed methods • Twice cooked • Adobe Flash Player Detection Kit • Embed only • SWFObject • Flash Satay • Unobtrusive Flash • Nested objects Objects (UFO) (Hixie) • ObjectSwap • Many, many other scripts...
  • 3.
  • 4. Some methods are on the road to nowhere; none of them are optimal
  • 5. The project Geoff Stearns SWFObject Bobby van der Sluis Unobtrusive Flash Objects (UFO) Michael Williams Adobe Flash Player Detection Kit
  • 6. 8 key questions 1. How to embed cross-browser? 2. How to comply with web standards? 3. What if no Flash plug-in is available? 4. How to deal with an outdated Flash plug-in? 5. Where to download the latest Flash plug-in? 6. How to help search engines? 7. How to avoid mechanisms that hurt the user experience? 8. How to do all of this in the easiest way possible?
  • 7. 8 key questions 1. How to embed cross-browser? 2. How to comply with web standards? 3. What if no Flash plug-in is available? 4. How to deal with an outdated Flash plug-in? 5. Where to download the latest Flash plug-in? 6. How to help search engines? 7. How to avoid mechanisms that hurt the user experience? 8. How to do all of this in the easiest way possible?
  • 9. Netscape’s <embed> <embed type=quot;application/x-shockwave-flashquot; src=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot; /> • Is patented and therefore not a web standard • Invalid HTML • Doesn’t support alternative content
  • 10. Alternative content Content that is accessible to people who browse the web without plugins
  • 11. Internet Explorer’s <object> <object classid=quot;clsid:D27CDB6E- AE6D-11cf-96B8-444553540000quot; width=quot;780quot; height=quot;390quot;> <param name=quot;moviequot; value=quot;myContent.swfquot; /> <p>Alternative content</p> </object> • Is a W3C Recommendation • Supports alternative content • Is a platform specific implementation
  • 12. Twice cooked <object classid=quot;clsid:D27CDB6E- AE6D-11cf-96B8-444553540000quot; width=quot;780quot; height=quot;390quot;> <param name=quot;moviequot; value=quot;myContent.swfquot; /> <embed type=quot;application/x-shockwave-flashquot; src=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot; /> </object> • Locked into vendor specific code • No alternative content possible • This is still the default publishing method of the Flash IDE today
  • 13. Web standards offer a universal language to a whole ecosystem of browser makers, tool builders, and web authors, so that all of these audiences can avoid compatibility problems, vendor lock-ins, and patent-infringement issues.
  • 14.
  • 15. Cross-browser today All modern web browsers support a platform independent implementation of <object> <object type=quot;application/x-shockwave-flashquot; data=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot;> <p>Alternative content</p> </object> Except Microsoft Internet Explorer <object classid=quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000quot; width=quot;780quot; height=quot;390quot;> <param name=quot;moviequot; value=quot;myContent.swfquot; /> <p>Alternative content</p> </object>
  • 16. Nested objects <object classid=quot;clsid:D27CDB6E- AE6D-11cf-96B8-444553540000quot; width=quot;780quot; height=quot;390quot;> <param name=quot;moviequot; value=quot;myContent.swfquot; /> <object type=quot;application/x-shockwave-flashquot; data=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot;> <p>Alternative content</p> </object> </object>
  • 17. Nested objects - take 2 <object classid=quot;clsid:D27CDB6E- AE6D-11cf-96B8-444553540000quot; width=quot;780quot; height=quot;390quot;> <param name=quot;moviequot; value=quot;myContent.swfquot; /> <!--[if !IE]>--> <object type=quot;application/x-shockwave-flashquot; data=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot;> <!--<![endif]--> <p>Alternative content</p> <!--[if !IE]>--> </object> <!--<![endif]--> </object>
  • 18. Why nested objects is better than twice cooked • It breaks the cycle of vendor lock-in • Valid HTML • The opportunity to use alternative content
  • 19. Markup vs scripting • Around 98% of the people has Flash Player 8 • Around 5% has no JavaScript support • Around 1% has poor JavaScript support
  • 20. 8 key questions 1. How to embed cross-browser? 2. How to comply with web standards? 3. What if no Flash plug-in is available? 4. How to deal with an outdated Flash plug-in? 5. Where to download the latest Flash plug-in? 6. How to help search engines? 7. How to avoid mechanisms that hurt the user experience? 8. How to do all of this in the easiest way possible?
  • 21. The Flash Player will attempt to play Flash content, no matter what Flash plugin version that content was published for
  • 22. Flash Player version detection Use JavaScript to: • Detect the Flash Player version • Determine whether Flash content or alternative content needs to be shown • Trigger Adobe Express Install (optional)
  • 24. The old way of downloading <embed ... pluginspage=quot;http://www.macromedia.com/ go/getflashplayerquot; />
  • 25. The old way of downloading
  • 26. The old way of downloading <object ... codebase=quot;http:// fpdownload.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=8,0,0,0quot;>
  • 27. The old way of downloading
  • 28. The modern way of downloading • Use alternative content • Use Adobe Express Install (optional) • Rely on browser built-in mechanisms (based on MIME type invocation)
  • 29.
  • 30. 8 key questions 1. How to embed cross-browser? 2. How to comply with web standards? 3. What if no Flash plug-in is available? 4. How to deal with an outdated Flash plug-in? 5. Where to download the latest Flash plug-in? 6. How to help search engines? 7. How to avoid mechanisms that hurt the user experience? 8. How to do all of this in the easiest way possible?
  • 31. Doesn’t Google index Flash content?
  • 32. Search engines and Flash content • Not all search engines index Flash content • Search engines are far more optimized to index HTML pages than Flash content • Flash indexing itself is limited: merely flat content in a specific order; it lacks the hierarchical structure and the semantics of HTML
  • 33. Strategies to help search engines 1. Use alternative content 2. Use Sitemaps and robots.txt
  • 34. 8 key questions 1. How to embed cross-browser? 2. How to comply with web standards? 3. What if no Flash plug-in is available? 4. How to deal with an outdated Flash plug-in? 5. Where to download the latest Flash plug-in? 6. How to help search engines? 7. How to avoid mechanisms that hurt the user experience? 8. How to do all of this in the easiest way possible?
  • 35. Active content • Eolas - Microsoft patent dispute • A user-unfriendly workaround by Microsoft and Opera to avoid claims • Affects Internet Explorer 6+ and Opera 9+
  • 37. Avoiding active content Publish your Flash content with JavaScript
  • 38. No more active content? • Microsoft has settled with Eolas • 2008 onwards: click-to-activate mechanism is removed from Internet Explorer via update • Opera to follow? • Apple and Opera to be sued next?
  • 39. 8 key questions 1. How to embed cross-browser? 2. How to comply with web standards? 3. What if no Flash plug-in is available? 4. How to deal with an outdated Flash plug-in? 5. Where to download the latest Flash plug-in? 6. How to help search engines? 7. How to avoid mechanisms that hurt the user experience? 8. How to do all of this in the easiest way possible?
  • 40.
  • 41. SWFObject 2.0 • Static publishing method • Dynamic publishing method • JavaScript API • Only utilizes 1 JavaScript file (9.2 Kb)
  • 42. Static publishing method Embed Flash content and alternative content using standards compliant markup, and use unobtrusive JavaScript to resolve the issues that markup alone cannot solve
  • 43. Static publishing - step 1 <object id=quot;myIdquot; classid=quot;clsid:D27CDB6E- AE6D-11cf-96B8-444553540000quot; width=quot;780quot; height=quot;390quot;> <param name=quot;moviequot; value=quot;myContent.swfquot; /> <!--[if !IE]>--> <object type=quot;application/x-shockwave-flashquot; data=quot;myContent.swfquot; width=quot;780quot; height=quot;390quot;> <!--<![endif]--> <p>Alternative content</p> <!--[if !IE]>--> </object> <!--<![endif]--> </object>
  • 44. Static publishing - step 2 <script type=quot;text/javascriptquot; src=quot;swfobject.jsquot;></script>
  • 45. Static publishing - step 3 <script type=quot;text/javascriptquot;> swfobject.registerObject(quot;myIdquot;, quot;9.0.0quot;); </script>
  • 46. Dynamic publishing method Create alternative content using standards compliant markup and embed Flash content with unobtrusive JavaScript
  • 47. Dynamic publishing - step 1 <div id=quot;myIdquot;> <p>Alternative content</p> </div>
  • 48. Dynamic publishing - step 2 <script type=quot;text/javascriptquot; src=quot;swfobject.jsquot;></script>
  • 49. Dynamic publishing - step 3 <script type=quot;text/javascriptquot;> swfobject.embedSWF(quot;myContent.swfquot;, quot;myIdquot;, quot;780quot;, quot;390quot;, quot;9.0.0quot;); </script>
  • 50.
  • 51.
  • 52. JavaScript API • swfobject.registerObject(...) • swfobject.embedSWF(...) • swfobject.getObjectById(...) • swfobject.getFlashPlayerVersion() • swfobject.hasFlashPlayerVersion(...) • swfobject.addLoadEvent(...) • swfobject.addDomLoadEvent(...) • swfobject.createSWF(...) • swfobject.createCSS(...) • swfobject.getQueryParamValue(...)
  • 53. SWFObject 2.0 and browser integration • As usual, e.g.: - Adobe External Interface - SWFAddress 2.0 - AS3.0 MouseWheel on Mac OSX • One catch with static publishing: Use swfobject.getObjectById(quot;myIdquot;) to retrieve the active <object>
  • 54. SWFObject 2.0 and accessibility • Create Flash content (for visitors with the right plug-in/JavaScript support) • Create alternative HTML content (for visitors that don’t have the right support) • Make your Flash content accessible • Make your HTML content accessible
  • 55. Links This presentation will soon be posted at: http://www.bobbyvandersluis.com SWFObject 2.0: http://code.google.com/p/swfobject/ SWFFix/SWFObject 2.0 dev blog: http://www.swffix.org Flash embedding cage match: http://www.alistapart.com/articles/flashembedcagematch/ Flash Player embed test suite: http://www.swffix.org/testsuite/