Photoshop Lightroom 1.0 Flash Gallery Tips and Tricks #13: Easily embed a Flash gallery in another web page
I’ve blogged about this topic before, but, as there have been several requests for clarification, I’m touching on it again and this time including an example. The key to embedding the gallery swf into a web page is to understand that the “path” to the the resources the gallery needs to work (the XML files) is hard coded into the swf. You can over-ride this with Flashvars, but you don’t need to. Simply move the gallery.swf file into the same folder on your web server as the html page you want it to be in, then move the bin and resources folders in there as well. Now you can use simple embed code to add your swf into your html page.
Here's an excerpt of that from the example above:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs
/flash/swflash.cab#version=7,0,19,0" width="730" height="685" align="middle" title="Flash Gallery">
<param name="movie" value="gallery.swf" />
<param name="quality" value="high" /><param name="SCALE" value="exactfit" />
<embed src="gallery.swf" width="730" height="685" align="middle" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit"></embed>
</object>
If you followed my instructions on where to put your gallery files, you could simply copy the code snippet above and paste it into your html page. You'd then probably want to change the width and height parameters to fit nicely within your layout. Note that you do this in two places.
In the example, I turned off the header and menu bar in the gallery, you can read how to do that here.
*Update: We've since posted a better description of how to embed your gallery using Flashvars vs simply leveraging the default file paths as decribed here. The simple method above works for the LR version (but not the Elements version), but I highly recommend using the FlashVars approach as it will make it much easier to update your galleries in the future (e.g. if a better version of the gallery.swf becomes available) and gives you greater flexibility for how you organize your files and folder on your web server*
|
|||