The example below shows the default widget usage without any customization.
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <p id="xbSlideshow"><a href="http://www.xorbin.com/">Flash slideshow widget</a></p> <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"><!-- var flashvars = { // no parameters }; swfobject.embedSWF( "xbSlideshow.swf", "xbSlideshow", "128", "128", "8", "expressInstall.swf", flashvars, {scale: "noscale", wmode: "transparent"} ); // --></script> |
Result
Important notices
- We use default XML image list file – items.xml, in this case we don’t need to write any path to XML file in the code above. Just name it items.xml, and save in the same directory as your HTML file is.
- Specify the width and height of the widget on lines #10, #11.
- Don’t forget to specify correct paths in lines: #2 (the location of javascript swfobject library), #8 (the location of the widget xbSlideshow.swf itself and #13 additional file called expressInstall.swf which asks your website visitors to update their flash plugins to view your website correctly).
items.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | < ?xml version="1.0" encoding="UTF-8" ?> <gallery> <item> <picture>images/photo01.jpg</picture> <url /> </item> <item> <picture>images/photo02.jpg</picture> <url /> </item> <item> <picture>images/photo03.jpg</picture> <url /> </item> <item> <picture>images/photo04.jpg</picture> <url /> </item> <item> <picture>images/photo05.jpg</picture> <url /> </item> </gallery> |
