Quantcast
Channel: Digicrafts » basic
Viewing all articles
Browse latest Browse all 4

Prepare custom xml and images

$
0
0

1. Prepare image for use with the components.

Resize and save your images into a folder of your website.

2. Create the custom XML file for the source.

Open any text editor (Notepad in Window or TextEdit in Mac OS) create a xml like the format show below. Save it to your website.

<items id = "items" relativepath="true">

<item path = "menu/icon_1.png" width = "128" height = "128" type = "bitmapfile">
<title>Item Title</title>
<description>Item description</description>
<link>link</link>
<linktarget>link</linktarget>
</item>

<item path = "menu/icon_2.png" width = "128" height = "128" type = "bitmapfile">
<title>Item Title</title>
<description>Item description</description>
<link>link</link>
</item>

</items>

The xml have a main tag  <items> and contains multiple <item> tag for each item.

<items> tag contains one option – relativepath=”true/false. If set to true, path of image source is related to xml file. Else, it is related to html/swf file.

Each <item> tag has the format.

<item path=”SOURCEPATH_OF_IMAGE” width=”WIDTH” height=”HEIGHT” type=”TYPE”>

 <title>CAPTION/TOOLTIP TEXT</title>
 …..
<OTHER_OPTIONAL_TAG></ OTHER_OPTIONAL_TAG>
</item>

Attribute:

Path – path of the source image

Width/height – dimension of the image

Type – type of the source. Possible value, BitmapFile | MovieFile.


Viewing all articles
Browse latest Browse all 4

Trending Articles