📄 xml_file.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>The controlVR XML File </title>
<link href="shares/help.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>The controlVR XML File</h1>
<p>The .XML file is the most important element of the VR object.</p>
<p>The .XML file stores all the paths of the images which need to be loaded by the controlVR component. It also determines how all the attributes are set for a specific object like direction, tempo, controlabilty, etc that is why it will be important for you to correctly create you .XML file. </p>
<p>The controlVR .XML file has two types of tags, namely: VR Tag and IMG Tag. </p>
<h3>The VR Tag </h3>
<p><strong>Syntax : </strong> <vr>...</vr></p>
<h4>Description:</h4>
<p>The VR Tag determines how the object and component behaves before and after loading. </p>
<h4>Attribute Specifications
</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th>Attribute</th>
<th>Value</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr>
<td>activelayer</td>
<td>[Number]</td>
<td>1</td>
<td>The layer that must be displayed first when object has loaded.</td>
</tr>
<tr>
<td>controlable</td>
<td>[0|1]</td>
<td>1</td>
<td>Sets if the object is controlable(If contralability is set to 0 then you will be unable to control the object with the mouse and keyboard, but you will still be able to control the object with Action Script).</td>
</tr>
<tr>
<td>keyboard</td>
<td>[0|1]</td>
<td>1</td>
<td>Sets if the object is controlable by the keyboard (If keyboard is set to 0 then the object is not keyboard controlable). </td>
</tr>
<tr>
<td>zoom</td>
<td>[0|1]</td>
<td>1</td>
<td>Sets if the object is able to zoom (If zoom is set to 0 then the object is not able to zoom - it will remove the zoomability on the keyboard and mouse). </td>
</tr>
<tr>
<td>direction</td>
<td>[CW|CCW]</td>
<td>CW</td>
<td>Sets if the object is spinning clockwise or counter clockwise when the object is first displayed and rotating is set to 1. </td>
</tr>
<tr>
<td>layers</td>
<td>[Number]</td>
<td>1</td>
<td>The amount of layers in the VR object . This attribute can be left out if you only make use of one layer. </td>
</tr>
<tr>
<td>progress</td>
<td>[0|1]</td>
<td>1</td>
<td>Sets if the loading process is displayed.</td>
</tr>
<tr>
<td>rotating</td>
<td>[0|1]</td>
<td>0</td>
<td>Indicates whether or not the object is rotating on startup.</td>
</tr>
<tr>
<td>tempo</td>
<td>[num]</td>
<td>50</td>
<td>Determines the milliseconds between each image interval on auto rotation. For instance if you need the image interval to be 0.5 second you would set the tempo to 500. </td>
</tr>
<tr>
<td>title</td>
<td>[Text]</td>
<td>Null</td>
<td>The title of the VR object (displayed with the progress when loading and will not be displayed if left blank or when progress attribute is set to 0).</td>
</tr>
</table>
<p> </p>
<h3>The IMG Tag</h3>
<p><strong>Syntax : </strong> <img src="url" /></p>
<h4>Description:</h4>
<p>The src attribute of the IMG tag determines the URL of a specific image. The URL can be a relative or absolute path. All the image tags must be defined in sequence because they are loaded from top to bottom(Sequentially meaning: From your first image to your last image for a single layer object and from your first image in the first layer to your last image in your last layer for a multiple layer object). </p>
<h4>Attribute Specifications</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th>Attribute</th>
<th>Value</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr>
<td>src</td>
<td>Path</td>
<td>undefined</td>
<td>The relative or absolute path to the image from the file displaying the component</td>
</tr>
</table>
<p><strong>Note: If using relative paths</strong><br>
If the .swf file is loaded by an .html file the path of the images should be relative to the .html. If you only make use of a .swf file the path should be relative to the .swf; the path should never be relative to the .xml file. </p>
<p><img src="shares/images/relative.png" width="388" height="293"></p>
<h4>Example 1: </h4>
<p>The following example will load a single layered object into a VR component with 18 images making up the image sequence- </p>
<code>
<pre><?xml version="1.0" encoding="iso-8859-1"?>
<vr>
<img src="image01.jpg" />
<img src="image02.jpg" />
<img src="image03.jpg" />
<img src="image04.jpg" />
<img src="image05.jpg" />
<img src="image06.jpg" />
<img src="image07.jpg" />
<img src="image08.jpg" />
<img src="image09.jpg" />
<img src="image10.jpg" />
<img src="image11.jpg" />
<img src="image12.jpg" />
<img src="image13.jpg" />
<img src="image14.jpg" />
<img src="image15.jpg" />
<img src="image16.jpg" />
<img src="image17.jpg" />
<img src="image18.jpg" />
</vr>
</pre>
</code>
<h4>Example 2:</h4>
<p>The following example will load a multiple layered object into a VR component consisting of 3 layers with 18 images per layer making up the image sequence-</p>
<code>
<pre><?xml version="1.0" encoding="iso-8859-1"?>
<vr layers="3">
<img src="image01.jpg" />
<img src="image02.jpg" />
<img src="image03.jpg" />
<img src="image04.jpg" />
<img src="image05.jpg" />
<img src="image06.jpg" />
<img src="image07.jpg" />
<img src="image08.jpg" />
<img src="image09.jpg" />
<img src="image10.jpg" />
<img src="image11.jpg" />
<img src="image12.jpg" />
<img src="image13.jpg" />
<img src="image14.jpg" />
<img src="image15.jpg" />
<img src="image16.jpg" />
<img src="image17.jpg" />
<img src="image18.jpg" />
<img src="image19.jpg" />
<img src="image20.jpg" />
<img src="image21.jpg" />
<img src="image22.jpg" />
<img src="image23.jpg" />
<img src="image24.jpg" />
<img src="image25.jpg" />
<img src="image26.jpg" />
<img src="image27.jpg" />
<img src="image28.jpg" />
<img src="image29.jpg" />
<img src="image30.jpg" />
<img src="image31.jpg" />
<img src="image32.jpg" />
<img src="image33.jpg" />
<img src="image34.jpg" />
<img src="image35.jpg" />
<img src="image36.jpg" />
<img src="image37.jpg" />
<img src="image38.jpg" />
<img src="image39.jpg" />
<img src="image40.jpg" />
<img src="image41.jpg" />
<img src="image42.jpg" />
<img src="image43.jpg" />
<img src="image44.jpg" />
<img src="image45.jpg" />
<img src="image46.jpg" />
<img src="image47.jpg" />
<img src="image48.jpg" />
<img src="image49.jpg" />
<img src="image50.jpg" />
<img src="image51.jpg" />
<img src="image52.jpg" />
<img src="image53.jpg" />
<img src="image54.jpg" />
</vr>
</pre>
</code>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -