<div dir="ltr"><div>Thanks! That helps. XMLElement will be valuable to me the way I am trying to organize my course (of course I&#39;ve been programming exclusively in Authorware for much too long).</div>
<div><br>&nbsp;</div>
<div class="gmail_quote">On Thu, Oct 2, 2008 at 12:50 PM, Julian Tenney <span dir="ltr">&lt;<a href="mailto:Julian.Tenney@nottingham.ac.uk">Julian.Tenney@nottingham.ac.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-GB" vlink="purple" link="blue">
<div>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">When you set the property of an icon using the editor, what you are doing is setting the value of an attribute in the underlying XML file, like this:</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&lt;DIS name="The Name For My Icon" id="myGraphic" x="etc"…./&gt;</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">That xml node is used to initiate a MovieClip at runtime. That movieclip can be addressed using the id defined in the xml (if it was defined – otherwise it gets a computer generated name);</span></p>

<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">The values of the attributes in the XML are not necessarily translated into properties of the resulting movieclip. As you have found, name will return undefined.</span></p>

<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">Each icon is a movieclip. Each Icon movieclip has a property called XMLELement. This is the XML node that was used to initiate the icon.</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">So <a href="http://myicon.xmlelement.attributes.name/" target="_blank">myIcon.XMLElement.attributes.name</a> will contain the value you entered in the editor.</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">Hope that helps understand what's going on.</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">J</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p style="MARGIN-LEFT: 36pt"><b><span lang="EN-US" style="FONT-SIZE: 10pt">From:</span></b><span lang="EN-US" style="FONT-SIZE: 10pt"> <a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Elly Langewis<br>
<b>Sent:</b> 02 October 2008 11:09<br><b>To:</b> <a href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a><br><b>Subject:</b> [Xerte] icon property</span></p></div>
<div>
<div></div>
<div class="Wj3C7c">
<p style="MARGIN-LEFT: 36pt">&nbsp;</p>
<div>
<div>
<p style="MARGIN-LEFT: 36pt">Hi Julian,</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">&nbsp;</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">In the Help file it says:</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">&nbsp;</p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><span style="FONT-SIZE: 10pt">For an icon with an id of &#39;myIcon&#39;, you can address properties and methods using the following code:</span> </p></div>
<p style="MARGIN-LEFT: 36pt">&nbsp;</p>
<p style="MARGIN-LEFT: 36pt"><span style="FONT-SIZE: 10pt">myIcon.property = value;</span></p></div>
<p style="MARGIN-LEFT: 36pt"><span style="FONT-SIZE: 10pt">myIcon.methodName();</span></p>
<div>
<p style="MARGIN-LEFT: 36pt">&nbsp;</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">But myIcon.name does return &#39;undefined&#39; (for a page).</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">I get the value of the property &#39;name&#39; back with myIcon.title...so my problem is solved, but I do not see why.</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">Even if I add the property &#39;title&#39; to the page myIcon.name stays &#39;undefined&#39;, so it is not a mix-up.</p></div>
<div>
<p style="MARGIN-LEFT: 36pt">Elly</p></div></div></div></div></div><br>_______________________________________________<br>Xerte mailing list<br><a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Elly Langewis<br>courseware developer<br>
Department of Biology<br>Utrecht University<br></div>