Embedding Etsy Spots on Your Site

From EtsyWiki

(Redirected from Embedding SWF on Your Site)
Jump to: navigation, search

Contents

Etsy Spots

Etsy makes and distributes advertisements you can put on your own site. Currently there is only one but plans for more are being drawn up.


'Original Recipe static image'

Image:Spot_originalrecipe.jpg

http://www.etsy.com/flash/spots/originalrecipe.jpg

'Original Recipe Flash'

http://www.etsy.com/flash/spots/originalrecipe.swf


Simple Instructions to Put This Ad on your Site

Just copy & paste this code:

<object width="125" height="125">
 <param name="movie" value="http://www.etsy.com/flash/spots/originalrecipe.swf"></param>
 <param name="wmode" value="transparent"></param>
 <embed src="http://www.etsy.com/flash/spots/originalrecipe.swf" type="application/x-shockwave-flash" wmode="transparent" width="125" height="125"></embed>
</object>

That's for a 125x125px ad. If you'd like it a bit bigger, you can adjust the parameters in the code above (in two places, at the beginning and end of the snippet).

Complicated Instructions to Embed 'Original Recipe' Ad

The best way to embed a SWF in a web page is with Geoff Searns' most excellent SWFObject. This is the way things are done at Etsy.com.

SWFObject is a small JavaScript file that lives in one place somewhere on your server. Once there, a small piece of script can then be used to embed any number of SWFs pretty much anywhere you want. Flash detection and other nice features are built in.

Complete directions on its use: http://blog.deconcept.com/swfobject/


  • Download originalrecipe.swf (right click the link above, save to your computer)
  • Upload the SWF to your server
  • Download SWFObject (http://blog.deconcept.com/swfobject/swfobject1-4.zip)
  • Upload the swfobject.js file to your server
  • Include the following code somewhere in the header of your page:
<script type="text/javascript" src="swfobject.js"></script>
  • Include the following code where you want to see the SWF:
<div id="flashcontent">
 This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
   var so = new SWFObject("originalrecipe.swf", "etsy_originalrecipe", "125", "125", "7", "#FFFFFF");
   so.write("flashcontent");
</script>
  • Test and toast your success. Done.


Note: We advise not to link directly to the SWFs on Etsy as they may change at anytime and without notice.

Personal tools