Flash gallery 1.0v
2009-12-28 10:26
This time i will share flash gallery. It was writeln during one project development. Key features are:
- Dynamic numbers of elements
- XML data
- Counter functionality (explained bellow)
- Image description
- Unlimited numbers of images
XML file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<image>
<file>images/images_01.png</file>
<title>Liquid Gold</title>
<desc>Liquid Gold desc</desc>
<thumb>images/images_thumb_01.png</thumb>
</image>
<image>
<file>images/images_02.png</file>
<title>The Search</title>
<desc>Liquid Gold desc</desc>
<thumb>images/images_thumb_02.png</thumb>
</image>
</gallery>
Gallery initialization looks like:
<div id="gallery_flash"></div>
<script type="text/javascript">
$(document).ready(function(){
$('#gallery_flash').flash(
{
src: 'gallery.swf',
width: 610,
height: 430,
flashvars: { path: 'data.xml',counter:'pixel.gif?node_counter=4955'+'&time='+Math.round(new Date().getTime() / 1000) }
},
{ version:9 }
);
});
</script>
There are two main parameters
- path - it describes where xml source is located
- counter - describes where to make request on gallery view. Gallery is considered as viewed then user clicks atleast two thumbnails.
See gallery demo
Download gallery source code
Back »
Comments: 0
Leave a reply »