swfobject

  • Tags : /
  • Latest : 2.2.1
  • Last Updated: 29 October 2011
  • Grails version : 1.3 > *
  • Authors : null
0 vote
Dependency :
compile ":swfobject:2.2.1"

Documentation

Summary

Resources and tags for swfobject

Description

SWFObject (+) is an easy-to-use and standards-friendly method to embed Flash content.

You must add this in your HEAD for dependencies:

<swfobject:resources />

or if you are using resources plugin

<r:require modules="swfobject"/>

Taglibs: swfobject:expressInstall swfobject:embedSWF swfobject:registerObject swfobject:expressInstallSWF

Example

<html>
<head>
   <title>swfobject</title>
   <g:javascript library="jquery" plugin="jquery"/>
   <swfobject:resources/>
   <style type="text/css" media="screen">
   html, body {
      height: 100%;
   }

#myId { width: 100%; height: 100%; }

body { margin: 0; padding: 0; overflow: hidden; } </style> </head>

<body>

<script type="text/javascript"> $(document).ready(function() { var flashvars = { scriptURL: '<g:createLink controller="flash" action="step" />' }; swfobject.embedSWF("<g:createLink controller="binary" action="show" id="1" />", "myId", "100%", "100%", "9.0.0", "<swfobject:expressInstallSWF />", flashvars); }); </script>

<div id="myId"> <p>Flash not installed</p> </div>

</body> </html>