Working with XML content

PREV
NEXT

Open the gallery.xml file in Dreamweaver (File -> Open), to change the content of your gallery. Also, you can open the XML content file through FlashDevelopment24 Wizard (Right click on Flash Object, then FlashDevlopment24 Wizard -> Flash Zoom Gallery). After that, in the category of 'General', click the 'Edit' button near the 'Source' field.

The following example shows the basic structure of the content XML file:

<?xml version="1.0" encoding="utf-8"?>
<gallery>
  <item caption="CAPTION 1" image="photos/photo01.jpg" large_image="photos/photo_large_01.jpg" link="empty.html" target="_blank" />
  <item caption="CAPTION 2" image="photos/photo02.jpg" large_image="photos/photo_large_02.jpg"/>
  <item caption="CAPTION 3" image="photos/photo03.jpg" large_image="photos/photo_large_03.jpg" description="DESCRIPTION" />
  <item caption="CAPTION 4" image="photos/photo04.jpg" />
</gallery>

In this example, parent <gallery> tag contains 4 child tags <item>. Each item represents as an image. All these items are differ only in additional attributes. For example: first item has caption - caption="CAPTION 1" , source of the image that is used in thumbnails and as an image preview- image="photos/photo01.jpg", source of the image that is used in Zoom window (here for example is used image of the larger resolution) - large_image="photos/photo_large_01.jpg" and it has a hyperlink - link="empty.html" target="_blank". Second item has caption, source of the image that is used in thumbnails and as an image preview and source of the image that is used in Zoom window. Third item additionally has description - description="DESCRIPTION" that is used in Zoom Window. Fourth item has only caption and source of the image that is used in thumbnails and as an image preview.

<gallery>

Description

Main tag and contains the description of the image gallery.

<item>

Description

Contains the path to the image file and description of this image. Attribute image is used to set the link to image. This image will be used in thumbnails and as an image preview. large_image attribute is used to set link to the original image, that is used in popup window. We have made feature of two different images in order to improve loading speed of the gallery. If the attribute large_image isn't set, so the same image will be used for Zoom window.

Attributes

  • caption; The caption of the image. It is shown when mouse over thumbnails or image preview.
  • image; The absolute or relative URL of the image file. A relative path must be relative to the HTML file. Absolute URLs must include the protocol reference, such as http://.
  • large_image; The absolute or relative URL of the large image file. A relative path must be relative to the HTML file. Absolute URLs must include the protocol reference, such as http://.
  • description; The description of the image. Description is located in the popup window with enlarged image.
  • link; The URL from which to obtain the document. If this attribute is set, so in the left bottom corner of the image preview will be situated an icon with hyperlink. Also this hyperlink can be called by a click on the image preview, if in config.xml you have set imageOnClick = "Hyperlink".
  • target; Specifies the window or HTML frame into which the document should be loaded. You can enter the name of a specific window or select from the following reserved target names:
    • _self; specifies the current frame in the current window.
    • _blank; specifies a new window.
    • _parent; specifies the parent of the current frame.
    • _top; specifies the top-level frame in the current window.